3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 1; $variantStartTime = DateTimeImmutable::createFromFormat(self::DATE_FORMAT, 'xxx'); var_dump($a == 1 && isset($variantStartTime) ? $variantStartTime : null);
based on 5N4GU
Output for 7.0.0 - 7.2.8
Fatal error: Uncaught Error: Cannot access self:: when no class scope is active in /in/7LVBh:4 Stack trace: #0 {main} thrown in /in/7LVBh on line 4
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Cannot access self:: when no class scope is active in /in/7LVBh on line 4
Process exited with code 255.
Output for 5.0.0 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/7LVBh on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ',', expecting '(' in /in/7LVBh on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ',', expecting '(' in /in/7LVBh on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/7LVBh on line 4
Process exited with code 255.