3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(''); $date->modify('1st day of month'); $i = new DateInterval('P1M'); $end = new DateTime('-1 year'); while ($date >= $end) { echo $date->format('Y F') . PHP_EOL; $date = $date->sub($i); }
Output for git.master, git.master_jit
Warning: DateTime::modify(): Failed to parse time string (1st day of month) at position 0 (1): Unexpected character in /in/AA0NE on line 3 2014 April 2014 March 2014 March 2014 February 2014 January 2013 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May
Output for rfc.property-hooks
Fatal error: Uncaught DateMalformedStringException: DateTime::modify(): Failed to parse time string (1st day of month) at position 0 (1): Unexpected character in /in/AA0NE:3 Stack trace: #0 /in/AA0NE(3): DateTime->modify('1st day of mont...') #1 {main} thrown in /in/AA0NE on line 3
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.67 ms | 401 KiB | 8 Q