3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass(); // False for > PHP 5 var_dump(empty($obj)); $list = array($obj, NULL, '', array()); foreach ($list as $item) { var_dump(empty($item)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/FR7S2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $obj, !1 = $list, !2 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        INIT_FCALL                                               'var_dump'
          4        ISSET_ISEMPTY_CV                                 ~6      !0
          5        SEND_VAL                                                 ~6
          6        DO_ICALL                                                 
    7     7        INIT_ARRAY                                       ~8      !0
          8        ADD_ARRAY_ELEMENT                                ~8      null
          9        ADD_ARRAY_ELEMENT                                ~8      ''
         10        ADD_ARRAY_ELEMENT                                ~8      <array>
         11        ASSIGN                                                   !1, ~8
    9    12      > FE_RESET_R                                       $10     !1, ->19
         13    > > FE_FETCH_R                                               $10, !2, ->19
   10    14    >   INIT_FCALL                                               'var_dump'
         15        ISSET_ISEMPTY_CV                                 ~11     !2
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                                 
    9    18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $10
   11    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.77 ms | 1395 KiB | 15 Q