3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = 'On Monday Liam'; preg_match('/^(Today|Yesterday|On (last )?(Sun|Mon|Tues|Wed|Thurs|Fri|Satur)day )?(.*)/', $text, $matches); $dow = $matches[1]; $dow = preg_replace('/^On /', '', $dow); $date = strtotime('Last '.$dow); $date = now(); print $dow; print date("Y-m-d", $date); var_export($matches);
based on 6fuXr
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function now() in /in/bI3W5:7 Stack trace: #0 {main} thrown in /in/bI3W5 on line 7
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined function now() in /in/bI3W5 on line 7
Process exited with code 255.