3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { function extra() { var_dump(self); } } $test = new Test(); $test->extra();
based on QNKIW
Output for 7.2.0
Warning: Use of undefined constant self - assumed 'self' (this will throw an Error in a future version of PHP) in /in/F8vY4 on line 5 string(4) "self"
Output for 5.3.19 - 7.1.10
Notice: Use of undefined constant self - assumed 'self' in /in/F8vY4 on line 5 string(4) "self"