3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'On Monday Liam'; preg_match('/^(Today|Yesterday|On (Sun|Mon|Tues|Wed|Thurs|Fri|Satur)day )?(.*)/', $text, $matches); $dow = $matches[1]; $dow = preg_replace('/^On /', '', $dow); $date = strtotime('Last '.$dow); print $dow; print date("Y-m-d", $date); var_export($matches);
Output for git.master, git.master_jit, rfc.property-hooks
Monday 2015-10-05array ( 0 => 'On Monday Liam', 1 => 'On Monday ', 2 => 'Mon', 3 => 'Liam', )

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