diff options
Diffstat (limited to 'Zend/tests/exception_015.phpt')
| -rw-r--r-- | Zend/tests/exception_015.phpt | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/Zend/tests/exception_015.phpt b/Zend/tests/exception_015.phpt new file mode 100644 index 0000000000..033848950e --- /dev/null +++ b/Zend/tests/exception_015.phpt @@ -0,0 +1,17 @@ +--TEST-- +Exceptions on improper access to string +--FILE-- +<?php +$s = "ABC"; +try { +	$s[] = "D"; +} catch (EngineException $e) { +	echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; +} + +$s[] = "D"; +?> +--EXPECTF-- +Exception: [] operator not supported for strings in %sexception_015.php on line %d + +Fatal error: [] operator not supported for strings in %sexception_015.php on line %d | 
