3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Berlin'); $date = new DateTime('2015-04-18 22:41:51'); $start = new DateTime("monday this week {$date->format('Y-m-d')}"); $end = new DateTime("monday next week {$date->format('Y-m-d')}"); $end->modify('-1 second'); echo '<pre>'; var_dump($start, $end, date("w")); echo '</pre>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre>object(DateTime)#2 (3) { ["date"]=> string(26) "2015-04-13 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Berlin" } object(DateTime)#3 (3) { ["date"]=> string(26) "2015-04-19 23:59:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Berlin" } string(1) "0" </pre>

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:
47.02 ms | 402 KiB | 8 Q