3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1 = new DateTime('2019-01'); $d2 = new DateTime('2019-04'); $interval = $d2->diff($d1); $counter = (int) $interval->format('%m'); do { echo $counter . PHP_EOL; echo $d1->format( 'Y-m-t' ) . PHP_EOL; $d1->modify('+1 months'); $counter--; } while ($counter >= 0);
Output for git.master, git.master_jit, rfc.property-hooks
3 2019-01-31 2 2019-02-28 1 2019-03-31 0 2019-04-30

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:
32.37 ms | 405 KiB | 5 Q