3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Selection of creation dates taken via twitter feed $dates = array( "Wed Sep 09 14:22:40 +0000 2015", "Wed Sep 09 18:25:05 +0000 2015", "Wed Sep 09 18:25:37 +0000 2015", "Wed Sep 09 18:29:01 +0000 2015", "Wed Sep 09 18:30:27 +0000 2015", "Wed Sep 09 18:34:51 +0000 2015", "Fri Sep 11 09:01:34 +0000 2015", "Fri Sep 11 09:02:16 +0000 2015", "Fri Sep 11 09:10:30 +0000 2015", "Fri Sep 11 23:04:33 +0000 2015", "Sat Sep 12 14:41:28 +0000 2015", "Sat Sep 12 14:43:43 +0000 2015", "Sat Sep 12 15:17:38 +0000 2015", "Mon Sep 14 11:04:54 +0000 2015", "Mon Sep 14 15:59:31 +0000 2015", "Mon Sep 14 16:35:01 +0000 2015", "Mon Sep 14 18:27:55 +0000 2015", "Mon Sep 14 23:49:10 +0000 2015", "Tue Sep 15 12:39:35 +0000 2015", "Tue Sep 15 19:09:31 +0000 2015" ); // Create a date for 1 week ago. $now = new DateTime(); $purgeUntil = $now->sub(new DateInterval('P1W')); // Iterate through all, create a DateTime instance and do comparison foreach( $dates as $date ){ $tweetDate = new DateTime($date); echo ($tweetDate < $purgeUntil) ? "Purge" : "Skip"; }
Output for git.master, git.master_jit, rfc.property-hooks
SkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkipSkip

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.78 ms | 401 KiB | 8 Q