3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new DateTime(); $b =new DateTime(); $interval = date_diff($a, $db); echo $interval->format('%S');
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined variable $db in /in/2WWE2 on line 7 Fatal error: Uncaught TypeError: date_diff(): Argument #2 ($targetObject) must be of type DateTimeInterface, null given in /in/2WWE2:7 Stack trace: #0 /in/2WWE2(7): date_diff(Object(DateTime), NULL) #1 {main} thrown in /in/2WWE2 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:
38.63 ms | 1355 KiB | 4 Q