3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!function_exists('array_combine')) { function array_combone($keyarray, $valuearray) { $_ret = array(); foreach($keyarray as $index => $key) $_ret[$key]=$valuearray[$index]; return $_ret; } } $stylestr = 'text-align:center;display:block;'; $_style = array(); preg_match_all('#(.*?):(.*?);#', $stylestr, $matches); //foreach($matches[1] as $index => $key) $_style[$key]=$matches[2][$index]; $_style = array_combine($matches[1], $matches[2]); var_dump($_style);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/aXETf
function name:  (null)
number of ops:  24
compiled vars:  !0 = $stylestr, !1 = $_style, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'array_combine'
          2        DO_ICALL                                         $3      
          3        BOOL_NOT                                         ~4      $3
          4      > JMPZ                                                     ~4, ->6
    3     5    >   DECLARE_FUNCTION                                         'array_combone'
    9     6    >   ASSIGN                                                   !0, 'text-align%3Acenter%3Bdisplay%3Ablock%3B'
   10     7        ASSIGN                                                   !1, <array>
   11     8        INIT_FCALL                                               'preg_match_all'
          9        SEND_VAL                                                 '%23%28.%2A%3F%29%3A%28.%2A%3F%29%3B%23'
         10        SEND_VAR                                                 !0
         11        SEND_REF                                                 !2
         12        DO_ICALL                                                 
   13    13        INIT_FCALL                                               'array_combine'
         14        FETCH_DIM_R                                      ~8      !2, 1
         15        SEND_VAL                                                 ~8
         16        FETCH_DIM_R                                      ~9      !2, 2
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !1, $10
   14    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Function %00array_combone%2Fin%2FaXETf%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/aXETf
function name:  array_combone
number of ops:  13
compiled vars:  !0 = $keyarray, !1 = $valuearray, !2 = $_ret, !3 = $key, !4 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN                                                   !2, <array>
    5     3      > FE_RESET_R                                       $6      !0, ->10
          4    > > FE_FETCH_R                                       ~7      $6, !3, ->10
          5    >   ASSIGN                                                   !4, ~7
          6        FETCH_DIM_R                                      ~10     !1, !4
          7        ASSIGN_DIM                                               !2, !3
          8        OP_DATA                                                  ~10
          9      > JMP                                                      ->4
         10    >   FE_FREE                                                  $6
    6    11      > RETURN                                                   !2
    7    12*     > RETURN                                                   null

End of function %00array_combone%2Fin%2FaXETf%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.34 ms | 1400 KiB | 21 Q