3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "2007-01-01"; $b = "2008-02-15"; $i = date("y-m", strtotime($a)); $y = date("y-m", strtotime($b)); while($i <= date("y-m", strtotime($b))){ echo $i."\n"; if(substr($i, 3, 2) == "12") $i = (date('y', mktime(0,0,0,1,1,substr($i,0,2)))+1)."-01"; else $i++; } echo date('y', mktime(0,0,0,1,1,substr($i,0,2)))+1; // echo "Oct 3,1975 was on a ".date("y", mktime(0,0,0,10,3,7)) . "<br>";
Output for git.master, git.master_jit, rfc.property-hooks
07-01 07-02 07-03 07-04 07-05 07-06 07-07 07-08 07-09 07-10 07-11 07-12 Fatal error: Uncaught TypeError: mktime(): Argument #6 ($year) must be of type ?int, string given in /in/sCpr7:15 Stack trace: #0 /in/sCpr7(15): mktime(0, 0, 0, 1, 1, '8-') #1 {main} thrown in /in/sCpr7 on line 15
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:
155.62 ms | 406 KiB | 5 Q