3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = FALSE; $now = date('Y-m-d'); $disco_date = "2015-01-01"; $disco_date = date_create($disco_date); echo date_format($disco_date,"Y-m-d"); date_add($disco_date,date_interval_create_from_date_string("60 days")); echo date_format($disco_date,"Y-m-d"); if($disco_date >= $now) echo $disco_date; else echo $now;
Output for git.master, git.master_jit, rfc.property-hooks
2015-01-012015-03-02 Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in /in/vJYJV:13 Stack trace: #0 {main} thrown in /in/vJYJV on line 13
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:
53.31 ms | 401 KiB | 8 Q