3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $REF_SEARCH = '/[\$%@][a-zA-Z0-9_\.]+/'; $REF_PARSE = '/^([\$%@])([a-zA-Z0-9_\.]+)/'; //todo or statement $smnt = '$sqwee.seqeqe|%_sdae.ss'; $search = preg_match_all($REF_SEARCH, $smnt, $searched); print_r($searched); $pl = preg_match($REF_PARSE, $smnt, $matched); print_r($matched);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => $sqwee.seqeqe [1] => %_sdae.ss ) ) Array ( [0] => $sqwee.seqeqe [1] => $ [2] => sqwee.seqeqe )