3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '18 hours and 14 minutes ago'; $regex = '#\d+\s\w+#'; preg_match_all($regex, $string, $matches); $date = new DateTime(); echo 'current date = '.$date->format('Y-m-d H:i:s')."\n"; foreach ($matches[0] as $modify) { $date->modify('-'.$modify); } echo 'modified date = '.$date->format('Y-m-d H:i:s');
Output for git.master, git.master_jit, rfc.property-hooks
current date = 2017-09-06 17:16:39 modified date = 2017-09-05 23:02:39

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