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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9IouB
function name:  (null)
number of ops:  16
compiled vars:  !0 = $str, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%5B1500000000%2C2823.43%2C2848%2C2827.86%2C2847.68%2C526.4426911499979%5D%5D'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAL                                                 '%2F%5B%2F%5D'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9IouB%3A5%240'
          5        BIND_LEXICAL                                             ~4, !1
    7     6        SEND_VAL                                                 ~4
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
    9    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9IouB%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9IouB
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $m, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    6     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAL                                                 '%2F%28%5B%5Cw%5D%2B%29%2F'
          6        SEND_VAL                                                 '%5B%241%5D'
          7        FETCH_DIM_R                                      ~3      !0, 1
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        ASSIGN_DIM                                               !1
         13        OP_DATA                                                  $5
    7    14      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9IouB%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.48 ms | 1396 KiB | 23 Q