3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Europe/London'); echo "<date>"; echo "|| This is a TEST || Oxygen8 - Haiti Appeal 2013 || Total Raised so far : £0 :( || "; /* print gmdate("D H:i:s",time()); */ $datetime1 = new DateTime('now'); $datetime2 = new DateTime('tomorrow 09:00:00'); $interval = date_diff($datetime1,$datetime2); echo $interval->format('%H:%i:%s to go!'); echo "</date>"; /* $d1 = new DateTime(); $d2 = new DateTime('21:00:00'); $d3 = new DateTime('09:00:00'); $d4=$d2->diff($d1); $d5=$d3->diff($d1); echo $d4->format(' %h:%i:%s is 21:00?'); echo $d5->format(' %h:%i:%s is 9:00?'); */ ?>
Output for 5.3.1, 5.3.17, 5.4.33, 5.5.22, 5.6.3, 7.0.19, 7.1.0, 7.3.0rc4
<date>|| This is a TEST || Oxygen8 - Haiti Appeal 2013 || Total Raised so far : £0 :( || 18:0:43 to go!</date>
Output for 5.3.0, 5.3.2 - 5.3.16, 5.3.18 - 5.4.32, 5.4.34 - 5.5.21, 5.5.23 - 5.6.2, 5.6.4 - 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.0.18, 7.0.20 - 7.0.31, 7.1.1 - 7.3.0rc3
<date>|| This is a TEST || Oxygen8 - Haiti Appeal 2013 || Total Raised so far : £0 :( || 18:0:44 to go!</date>
Output for 5.2.0 - 5.2.17
<date>|| This is a TEST || Oxygen8 - Haiti Appeal 2013 || Total Raised so far : £0 :( || Fatal error: Call to undefined function date_diff() in /in/J1K2X on line 13
Process exited with code 255.
Output for 5.1.0 - 5.1.6
<date>|| This is a TEST || Oxygen8 - Haiti Appeal 2013 || Total Raised so far : £0 :( || Fatal error: Class 'DateTime' not found in /in/J1K2X on line 11
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/J1K2X on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/J1K2X on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/J1K2X on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/J1K2X on line 3