3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { function bar() { echo "Hello, world"; $this->_error('Something went wrong'); } } $foo = new Foo(); $foo->bar();
Output for 7.0.0 - 7.1.0
Hello, world Fatal error: Uncaught Error: Call to undefined method Foo::_error() in /in/WT0dm:5 Stack trace: #0 /in/WT0dm(10): Foo->bar() #1 {main} thrown in /in/WT0dm on line 5
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Hello, world Fatal error: Call to undefined method Foo::_error() in /in/WT0dm on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Hello, world Fatal error: Call to undefined method: foo->_error() in /in/WT0dm on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Hello, world Fatal error: Call to undefined function: _error() in /in/WT0dm on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Hello, world Fatal error: Call to undefined function: _error() in /in/WT0dm on line 5