3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function getDay($day) { $days = array('Monday' => 1, 'Tuesday' => 2, 'Wednesday' => 3, 'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6, 'Sunday' => 7); $today = new /DateTime(); $today->setISODate($today->format('o'), $today->format('W'), $days[ucfirst($day)]); return $today; } var_dump(getDay('Monday')->format('l dS F Y')); var_dump(getDay('Friday')->format('l dS F Y'));
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected '/' in /in/PWmNt on line 6
Process exited with code 255.