3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //round pour le changement d'heure $debut = mktime(0, 0, 0, 10, 26, 2013); $fin = mktime(0, 0, 0, 11, 10, 2013); $d1 = self::getDateObject(); $d2 = self::getDateObject(); $d1->setTimestamp($debut); $d2->setTimestamp($fin); $diff = $d1->diff($d2); prin_t($diff);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Cannot access self:: when no class scope is active in /in/J7CF0:7 Stack trace: #0 {main} thrown in /in/J7CF0 on line 7
Process exited with code 255.
Output for hhvm-3.12.0 - 3.13.2
Fatal error: Uncaught Error: Cannot access self:: when no class scope is active in /in/J7CF0:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.10.0
Fatal error: Cannot access self:: when no class scope is active in /in/J7CF0 on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'self' in /in/J7CF0 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'self' in /in/J7CF0 on line 7