3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(strtotime("23/02/2013")); var_dump(new \DateTime("23/02/2013")); die; abstract class T { static public $instanses; final private function __construct(){ } public static function getInstance() { if (!(static::$instanses instanceof static)) { static::$instanses = new static; } return static::$instanses; } } class A extends T { static public $instanses; } class B extends A { static public $instanses; } $t = A::getInstance(); var_dump($t); $t1 = B::getInstance(); var_dump($t1); new B(); ?>
based on g2hKH
Output for 7.0.0 - 7.2.0
bool(false) Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (23/02/2013) at position 0 (2): Unexpected character in /in/LXWtQ:3 Stack trace: #0 /in/LXWtQ(3): DateTime->__construct('23/02/2013') #1 {main} thrown in /in/LXWtQ on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.28
bool(false) Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (23/02/2013) at position 0 (2): Unexpected character' in /in/LXWtQ:3 Stack trace: #0 /in/LXWtQ(3): DateTime->__construct('23/02/2013') #1 {main} thrown in /in/LXWtQ on line 3
Process exited with code 255.