3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sql_dob = date_create_from_format('Y-m-d','1969-03-09'); $today = date_create(); echo date_format($today,'Y'); $age = date_diff($today,$sql_dob); echo date_format($age,'Y'); ?>
Output for git.master, git.master_jit, rfc.property-hooks
2014 Fatal error: Uncaught TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, DateInterval given in /in/f94Le:10 Stack trace: #0 /in/f94Le(10): date_format(Object(DateInterval), 'Y') #1 {main} thrown in /in/f94Le on line 10
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:
43.09 ms | 401 KiB | 8 Q