summaryrefslogtreecommitdiff
path: root/Zend/tests/exception_015.phpt
blob: 033848950ebd735b6f33333ca8c0153e55fb7d71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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