3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { var $x = 'y'; function __construct() { $this->bar(); } private function bar() { return $this->x; } } echo new foo();
based on QSais
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class foo could not be converted to string in /in/VR7mQ on line 12
Process exited with code 255.
Output for 5.3.20 - 7.0.20
Catchable fatal error: Object of class foo could not be converted to string in /in/VR7mQ on line 12
Process exited with code 255.