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); print_r($arr); var_dump($arr);
based on 6Y4pV
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0alpha1
Warning: preg_replace_callback(): Unknown modifier ']' in /in/9IouB on line 7 Array ( ) array(0) { }
Output for hhvm-3.15.4
Warning: Unknown modifier ']': [/[/]] in /in/9IouB on line 7 Array ( ) array(0) { }