2015-03-31 21:37:59 +00:00
|
|
|
--TEST--
|
|
|
|
Exceptions on improper access to static class properties
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class C {
|
|
|
|
private $p = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$x = new C;
|
|
|
|
try {
|
|
|
|
var_dump($x->p);
|
2015-05-17 22:31:43 +00:00
|
|
|
} catch (Error $e) {
|
2015-03-31 21:37:59 +00:00
|
|
|
echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
var_dump($x->p);
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2015-04-01 01:56:55 +00:00
|
|
|
Exception: Cannot access private property C::$p in %sexception_014.php on line %d
|
2015-03-31 21:37:59 +00:00
|
|
|
|
2015-05-17 22:31:43 +00:00
|
|
|
Fatal error: Uncaught Error: Cannot access private property C::$p in %sexception_014.php:%d
|
2015-05-15 19:04:07 +00:00
|
|
|
Stack trace:
|
|
|
|
#0 {main}
|
|
|
|
thrown in %sexception_014.php on line %d
|