3v4l.org

run code in 300+ PHP versions simultaneously
<?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); var_dump($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => [1500000000 [1] => 2823.43 [2] => 2848 [3] => 2827.86 [4] => 2847.68 [5] => 526.4426911499979 ) ) array(1) { [0]=> array(6) { [0]=> string(11) "[1500000000" [1]=> string(7) "2823.43" [2]=> string(4) "2848" [3]=> string(7) "2827.86" [4]=> string(7) "2847.68" [5]=> string(17) "526.4426911499979" } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
64.53 ms | 402 KiB | 8 Q