3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if('12/10/2000' < '10/10/2000') echo "true\n"; else echo "false\n"; $data = date('d/m/Y'); print_r($data); echo "\n"; $data1 = DateTime::createFromFormat('d/m/Y', $data); $data2 = DateTime::createFromFormat('d/m/Y', $data); echo $data1 == $data2.add(new DateInterval('P1D')) ? "iguais\n" : "diferentes\n";
Output for 7.0.0 - 7.1.0
false 11/12/2013 Fatal error: Uncaught Error: Call to undefined function add() in /in/QGb6S:9 Stack trace: #0 {main} thrown in /in/QGb6S on line 9
Process exited with code 255.
Output for hhvm-3.12.0
false 11/12/2013 Fatal error: Uncaught Error: Call to undefined function add() in /in/QGb6S:9 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.3.0 - 5.6.28, hhvm-3.10.0
false 11/12/2013 Fatal error: Call to undefined function add() in /in/QGb6S on line 9
Process exited with code 255.
Output for 5.2.10 - 5.2.17
false 11/12/2013 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/QGb6S on line 7
Process exited with code 255.
Output for 5.2.0 - 5.2.9
false 11/12/2013 Fatal error: Call to undefined method DateTime::createfromformat() in /in/QGb6S on line 7
Process exited with code 255.
Output for 5.0.0 - 5.1.6
false 11/12/2013 Fatal error: Class 'DateTime' not found in /in/QGb6S on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
false 11/12/2013 Fatal error: Undefined class name 'datetime' in /in/QGb6S on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
false 11/12/2013 Fatal error: Undefined class name 'datetime' in /in/QGb6S on line 7