3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { function __construct() { echo get_class(self); } } class B extends A { } new A; new B;
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Use of undefined constant self - assumed 'self' in /in/LRb2L on line 5 Warning: get_class() expects parameter 1 to be object, string given in /in/LRb2L on line 5 Notice: Use of undefined constant self - assumed 'self' in /in/LRb2L on line 5 Warning: get_class() expects parameter 1 to be object, string given in /in/LRb2L on line 5
Output for 5.0.0 - 5.2.17, hhvm-3.10.0 - 3.12.0
Notice: Use of undefined constant self - assumed 'self' in /in/LRb2L on line 5 Notice: Use of undefined constant self - assumed 'self' in /in/LRb2L on line 5
Output for 4.3.0 - 4.4.9