3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isEmptyArray($item) { if (is_array($item)) { return array_filter($item, 'isEmptyArray'); } if (!empty($item) || $item === "0") { return true; } return false; } function removeEmptyArrays($array) { $filteredArray = array_filter($array, 'isEmptyArray'); return $filteredArray; } $string='client_no=3286868&auth_key=K6htqteKvAFpJE4qaE655hTQRSVN9PGU&rest_call=create_acct_complete_m&billing_group[billing_group_row][0][billing_group_name]=&billing_group[billing_group_row][0][billing_group_description]=&billing_group[billing_group_row][0][client_billing_group_id]=&billing_group[billing_group_row][0][billing_group_idx]=&billing_group[billing_group_row][0][notify_method]=&billing_group[billing_group_row][0][notify_template_group]=&billing_group[billing_group_row][0][statement_template]='; parse_str($string, $output); var_dump(output); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E17mA
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ASSIGN                                                   !0, 'client_no%3D3286868%26auth_key%3DK6htqteKvAFpJE4qaE655hTQRSVN9PGU%26rest_call%3Dcreate_acct_complete_m%26billing_group%5Bbilling_group_row%5D%5B0%5D%5Bbilling_group_name%5D%3D%26billing_group%5Bbilling_group_row%5D%5B0%5D%5Bbilling_group_description%5D%3D%26billing_group%5Bbilling_group_row%5D%5B0%5D%5Bclient_billing_group_id%5D%3D%26billing_group%5Bbilling_group_row%5D%5B0%5D%5Bbilling_group_idx%5D%3D%26billing_group%5Bbilling_group_row%5D%5B0%5D%5Bnotify_method%5D%3D%26billing_group%5Bbilling_group_row%5D%5B0%5D%5Bnotify_template_group%5D%3D%26billing_group%5Bbilling_group_row%5D%5B0%5D%5Bstatement_template%5D%3D'
   24     1        INIT_FCALL                                               'parse_str'
          2        SEND_VAR                                                 !0
          3        SEND_REF                                                 !1
          4        DO_ICALL                                                 
   26     5        INIT_FCALL                                               'var_dump'
          6        FETCH_CONSTANT                                   ~4      'output'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   27     9      > RETURN                                                   1

Function isemptyarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/E17mA
function name:  isEmptyArray
number of ops:  17
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~1, ->8
    5     3    >   INIT_FCALL                                               'array_filter'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'isEmptyArray'
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
    8     8    >   ISSET_ISEMPTY_CV                                 ~3      !0
          9        BOOL_NOT                                         ~4      ~3
         10      > JMPNZ_EX                                         ~4      ~4, ->13
         11    >   IS_IDENTICAL                                     ~5      !0, '0'
         12        BOOL                                             ~4      ~5
         13    > > JMPZ                                                     ~4, ->15
    9    14    > > RETURN                                                   <true>
   12    15    > > RETURN                                                   <false>
   13    16*     > RETURN                                                   null

End of function isemptyarray

Function removeemptyarrays:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E17mA
function name:  removeEmptyArrays
number of ops:  8
compiled vars:  !0 = $array, !1 = $filteredArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'isEmptyArray'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
   18     6      > RETURN                                                   !1
   19     7*     > RETURN                                                   null

End of function removeemptyarrays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.41 ms | 1400 KiB | 19 Q