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); print_r($arr); var_dump($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: preg_replace_callback(): Delimiter must not be alphanumeric, backslash, or NUL in /in/6Y4pV on line 5 Array ( ) array(0) { }

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:
30.85 ms | 401 KiB | 8 Q