3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'test:cool@@'; function parseConditionString($sConditions) { $aConditions = array(); $aTmp = explode('@@', $sConditions); foreach ($aTmp as $sTmp) { $aParts = explode(';', $sTmp); if(isset($aParts[0]) && isset($aParts[1])){ $aConditions[$aParts[0]] = $aParts[1]; } } return $aConditions; } $var = parseConditionString($string); print_r($var);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lYMKb
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string, !1 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test%3Acool%40%40'
   17     1        INIT_FCALL                                               'parseconditionstring'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   18     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function parseconditionstring:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 23
Branch analysis from position: 18
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/lYMKb
function name:  parseConditionString
number of ops:  27
compiled vars:  !0 = $sConditions, !1 = $aConditions, !2 = $aTmp, !3 = $sTmp, !4 = $aParts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%40%40'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    7     7      > FE_RESET_R                                       $8      !2, ->24
          8    > > FE_FETCH_R                                               $8, !3, ->24
    8     9    >   INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '%3B'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !4, $9
    9    14        ISSET_ISEMPTY_DIM_OBJ                         0  ~11     !4, 0
         15      > JMPZ_EX                                          ~11     ~11, ->18
         16    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !4, 1
         17        BOOL                                             ~11     ~12
         18    > > JMPZ                                                     ~11, ->23
   10    19    >   FETCH_DIM_R                                      ~13     !4, 0
         20        FETCH_DIM_R                                      ~15     !4, 1
         21        ASSIGN_DIM                                               !1, ~13
         22        OP_DATA                                                  ~15
    7    23    > > JMP                                                      ->8
         24    >   FE_FREE                                                  $8
   14    25      > RETURN                                                   !1
   15    26*     > RETURN                                                   null

End of function parseconditionstring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.87 ms | 1403 KiB | 18 Q