3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $p = '~"(\d+)"~'; $a = '["1","2","3","4"'; preg_match_all($p, $a, $r); var_dump($r);
based on JnIZl
Output for 5.6.0 - 7.3.0beta1
array(2) { [0]=> array(4) { [0]=> string(3) ""1"" [1]=> string(3) ""2"" [2]=> string(3) ""3"" [3]=> string(3) ""4"" } [1]=> array(4) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" [3]=> string(1) "4" } }