3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr[] = ''; var_dump($arr); if (count($arr) === 1 && isset($arr[0]) && $arr[0] === '') { $arr = []; } var_dump($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 14
Branch analysis from position: 10
filename:       /in/DhFR4
function name:  (null)
number of ops:  20
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  ''
    5     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    7     5        COUNT                                            ~3      !0
          6        IS_IDENTICAL                                     ~4      ~3, 1
          7      > JMPZ_EX                                          ~4      ~4, ->10
          8    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~5      !0, 0
          9        BOOL                                             ~4      ~5
         10    > > JMPZ_EX                                          ~4      ~4, ->14
         11    >   FETCH_DIM_R                                      ~6      !0, 0
         12        IS_IDENTICAL                                     ~7      ~6, ''
         13        BOOL                                             ~4      ~7
         14    > > JMPZ                                                     ~4, ->16
    8    15    >   ASSIGN                                                   !0, <array>
   11    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.13 ms | 942 KiB | 16 Q