3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = ''; $array3 = []; $str = 'width: 500px; height: 500px; border-width: 5px; border-radius: 30px;'; $array2 = preg_split('/([\s;:]+)/', $str ); array_walk( $array2, function($el) use (&$array, &$key) { if($key) { $array3[$key] = $el; $key = null; } else { $key = $el; print($el); } } ); print_r($array3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oEMQ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $key, !1 = $array3, !2 = $str, !3 = $array2, !4 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, ''
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, 'width%3A+500px%3B+height%3A+500px%3B+border-width%3A+5px%3B+border-radius%3A+30px%3B'
    5     3        INIT_FCALL                                               'preg_split'
          4        SEND_VAL                                                 '%2F%28%5B%5Cs%3B%3A%5D%2B%29%2F'
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !3, $8
    6     8        INIT_FCALL                                               'array_walk'
    7     9        SEND_REF                                                 !3
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4oEMQ%3A7%240'
         11        BIND_LEXICAL                                             ~10, !4
         12        BIND_LEXICAL                                             ~10, !0
   16    13        SEND_VAL                                                 ~10
         14        DO_ICALL                                                 
   20    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F4oEMQ%3A7%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oEMQ
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $el, !1 = $array, !2 = $key, !3 = $array3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
    8     3      > JMPZ                                                     !2, ->8
    9     4    >   ASSIGN_DIM                                               !3, !2
          5        OP_DATA                                                  !0
   10     6        ASSIGN                                                   !2, null
          7      > JMP                                                      ->10
   13     8    >   ASSIGN                                                   !2, !0
   14     9        ECHO                                                     !0
   16    10    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F4oEMQ%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.97 ms | 1401 KiB | 19 Q