3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $attributes['action'] = 'order.php?param1=aaa&param2=bbb'; switch($attributes['action']) { case "list": echo 'List!'; break; case "listorder": echo 'Listorder!'; break; case (preg_match('~order\.php\?.*~', $attributes['action']) ? true : false): echo 'Regex works!'; break; default: echo 'Regex doesn\'t work((('; break; }
Output for 4.3.0 - 7.1.0
Regex works!