3v4l.org

run code in 300+ PHP versions simultaneously
<?php function newtime2($timestamp, $newtime='05:00'){ $a_times = explode(':', $newtime); $objDate = (new DateTime($timestamp, new DateTimeZone('Europe/Berlin')))->setTime($a_times[0], $a_times[1]); return $objDate->format("U"); } var_dump(newtime2(1449759874, '00:01'));
Output for git.master, git.master_jit
Fatal error: Uncaught Exception: Failed to parse time string (1449759874) at position 8 (7): Unexpected character in /in/1HIiL:4 Stack trace: #0 /in/1HIiL(4): DateTime->__construct('1449759874', Object(DateTimeZone)) #1 /in/1HIiL(8): newtime2(1449759874, '00:01') #2 {main} thrown in /in/1HIiL on line 4
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (1449759874) at position 8 (7): Unexpected character in /in/1HIiL:4 Stack trace: #0 /in/1HIiL(4): DateTime->__construct('1449759874', Object(DateTimeZone)) #1 /in/1HIiL(8): newtime2(1449759874, '00:01') #2 {main} thrown in /in/1HIiL on line 4
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:
47.77 ms | 401 KiB | 8 Q