3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $o1 = new stdclass($a=8); var_dump($a); // Notice: Undefined variable: a $o2 = new Datetime($b='now'); var_dump($b); // string "now"
Output for 7.1.0 - 7.3.0rc4
int(8) string(3) "now"
Output for 5.2.0 - 7.0.20
Notice: Undefined variable: a in /in/TTdbB on line 3 NULL string(3) "now"
Output for 5.0.4 - 5.0.5, 5.1.1 - 5.1.6
Notice: Undefined variable: a in /in/TTdbB on line 3 NULL Fatal error: Class 'Datetime' not found in /in/TTdbB on line 5
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/TTdbB on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: a in /in/TTdbB on line 3 NULL Fatal error: Class 'Datetime' not found in /in/TTdbB on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: a in /in/TTdbB on line 3 NULL Fatal error: Cannot instantiate non-existent class: datetime in /in/TTdbB on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: a in /in/TTdbB on line 3 NULL Fatal error: Cannot instantiate non-existent class: datetime in /in/TTdbB on line 5