[ create a new paste ] login | about

Link: http://codepad.org/Zu6yQuno    [ raw code | output | fork ]

PHP, pasted on May 26:
1
2
3
4
5
6
7
8
<?php
error_reporting(E_ALL);
class x{};
$x = new x();
echo "this will cause a notice:\n";
echo $x->foo;
echo "and this a fatal error:\n";
echo $x->{''}; // same as $y = ''; $x->$y;


Output:
1
2
3
4
5
6
this will cause a notice:

Notice: Undefined property:  x::$foo on line 6
and this a fatal error:

Fatal error: Cannot access empty property on line 8


Create a new paste based on this one


Comments: