3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "[[1500000000,2823.43,2848,2827.86,2847.68,526.4426911499979]]"; $arr = []; preg_replace_callback('/\[(.*?)\]/', function($m) use (&$arr){ $arr[] = explode(',',preg_replace('/([\w]+)/', "$1", $m[1])); }, $str); $arr2 = []; preg_replace_callback('/\[(.*?)\]/', function($m) use (&$arr2){ $arr2[] = explode(',',preg_replace('/([\w]+)/', "$1", $m[1])); }, $str); print_r($arr2);
based on ZqRHp
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0beta1
Array ( [0] => Array ( [0] => [1500000000 [1] => 2823.43 [2] => 2848 [3] => 2827.86 [4] => 2847.68 [5] => 526.4426911499979 ) )