3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
71.06 ms | 402 KiB | 5 Q