summaryrefslogtreecommitdiff
path: root/Zend/tests/exception_014.phpt
blob: 71bb14df1dcd48080027460e3fec814360d440d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Exceptions on improper access to static class properties
--FILE--
<?php
class C {
	private $p = 0;
}

$x = new C;
try {
	var_dump($x->p);
} catch (EngineException $e) {
	echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
}

var_dump($x->p);
?>
--EXPECTF--
Exception: Cannot access private property C::$p in %sexception_014.php on line %d

Fatal error: Cannot access private property C::$p in %sexception_014.php on line %d