3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'a{ra:calc(*(la)100%);font-s'; $string_regex = '((?<!\\\\)(?:\\\\\\\\)*(\'|")(?:.*?[^\\\\])??(?:\\\\\\\\)*\\2)'; $comment_regex = '(\\/\\*(?:(?!\\*\\/).)*\\*\\/)'; $url_regex = '(?<=:| |,|\\(|\\))(url|calc)\\s*(\\()\\s*((?:[^()]+|(?2))*?)\\s*(\\))'; $string = preg_match('/'.$string_regex.'|'.$comment_regex.'|'.$url_regex.'|'.$calc_regex.'/si', $string, $matches);
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: calc_regex in /in/40HHi on line 6
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: calc_regex in /in/40HHi on line 6