3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateTime = new DateTime('2015-01-07 14:19:14', new DateTimeZone('UTC')); $dateTime->sub(new DateInterval('PT24H')); $begin = $dateTime; $end = new DateTime( '2015-01-07 14:19:14' ); $end = $end->modify( '+1 hour' ); $interval = new DateInterval('PT1H'); $daterange = new DatePeriod($begin, $interval ,$end); foreach($daterange as $date){ //echo $date->format("Y-m-d H") . "<br>"; } preg_match('/([0-9]{4}-[0-9]{2}-[0-9]{2})( )([0-9]{2}:[0-9]{2}:[0-9]{2})( )(UTC)/', 'fdgjfdgigo 2015-01-07 14:19:14 UTC', $match); var_dump($match);
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> string(23) "2015-01-07 14:19:14 UTC" [1]=> string(10) "2015-01-07" [2]=> string(1) " " [3]=> string(8) "14:19:14" [4]=> string(1) " " [5]=> string(3) "UTC" }

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:
51.52 ms | 401 KiB | 8 Q