3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Prague'); $t = 1414754455; // 31.10.2014 # time() - 24*60*60; // yesterday $dt = new Datetime($t); $dt->modify("+1 month"); $dt->format("d.m.Y"); $t1 = strtotime("next month", $t); $t2 = strtotime("first day of next month", $t); echo date("d.m.Y", $t) . ": $t\n"; echo date("d.m.Y", $t1) . ": $t1\n"; echo date("d.m.Y", $t2) . ": $t2\n"; echo "DIFF: " . ($t1-$t2); echo $dt->format("d.m.Y") . "\n";
Output for git.master, git.master_jit
Fatal error: Uncaught Exception: Failed to parse time string (1414754455) at position 8 (5): Unexpected character in /in/1N3Ms:7 Stack trace: #0 /in/1N3Ms(7): DateTime->__construct('1414754455') #1 {main} thrown in /in/1N3Ms on line 7
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (1414754455) at position 8 (5): Unexpected character in /in/1N3Ms:7 Stack trace: #0 /in/1N3Ms(7): DateTime->__construct('1414754455') #1 {main} thrown in /in/1N3Ms on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.82 ms | 401 KiB | 8 Q