3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weekModifier = 1; $date = new DateTime()+3; if($date->format('N') !== 1) { $date->sub(new DateInterval('P'. $date->format('N') . 'D')); } $interval = new DateInterval('P'.abs($weekModifier).'W'); if($weekModifier > 0) { $date->add($interval); } else { $date->sub($interval); } for($i = 1; $i <= 7; $i++) { echo $date->add(new DateInterval('P1D'))->format('l Y-m-d') . "<br>\n"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: Unsupported operand types: DateTime + int in /in/flobr:5 Stack trace: #0 {main} thrown in /in/flobr on line 5
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:
39.77 ms | 401 KiB | 8 Q