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 ? "iguais\n" : "diferentes\n";
Output for 5.3.0 - 7.1.0
false 11/12/2013 iguais
Output for 5.2.10 - 5.2.17
false 11/12/2013 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/RmNZ2 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/RmNZ2 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/RmNZ2 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/RmNZ2 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/RmNZ2 on line 7