3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = DateTime::createFromFormat('z Y', "59 2016"); //wrong with leap year $date2 = DateTime::createFromFormat('Y z', "2016 59"); //correct $date3 = DateTime::createFromFormat('d-m-Y', "29-02-2016"); //correct $date4 = DateTime::createFromFormat('Y-m-d', "2016-02-29"); //correct // let's see: print $date1->format("z Y")."\n"; //60 2016 print $date2->format("z Y")."\n"; //59 2016 print $date3->format("z Y")."\n"; //59 2016 print $date4->format("z Y")."\n"; //59 2016
Output for git.master, git.master_jit
Fatal error: Uncaught Error: Call to a member function format() on bool in /in/ei8A2:8 Stack trace: #0 {main} thrown in /in/ei8A2 on line 8
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught Error: Call to a member function format() on false in /in/ei8A2:8 Stack trace: #0 {main} thrown in /in/ei8A2 on line 8
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:
124.52 ms | 406 KiB | 5 Q