mirror of
https://github.com/php/php-src.git
synced 2024-09-26 20:37:29 +00:00
18 lines
429 B
PHP
18 lines
429 B
PHP
--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
|