3v4l.org

run code in 300+ PHP versions simultaneously
<?php $h_somevar = NULL; $h_othervar = 'hi there'; $h_anothervar = NULL; $hlist = array($h_somevar, $h_othervar, $h_anothervar); foreach($hlist as $hl) { if(!empty($hl)) { echo $hl; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/4ZNHB
function name:  (null)
number of ops:  16
compiled vars:  !0 = $h_somevar, !1 = $h_othervar, !2 = $h_anothervar, !3 = $hlist, !4 = $hl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    4     1        ASSIGN                                                   !1, 'hi+there'
    5     2        ASSIGN                                                   !2, null
    7     3        INIT_ARRAY                                       ~8      !0
          4        ADD_ARRAY_ELEMENT                                ~8      !1
          5        ADD_ARRAY_ELEMENT                                ~8      !2
          6        ASSIGN                                                   !3, ~8
    9     7      > FE_RESET_R                                       $10     !3, ->14
          8    > > FE_FETCH_R                                               $10, !4, ->14
   10     9    >   ISSET_ISEMPTY_CV                                 ~11     !4
         10        BOOL_NOT                                         ~12     ~11
         11      > JMPZ                                                     ~12, ->13
   11    12    >   ECHO                                                     !4
    9    13    > > JMP                                                      ->8
         14    >   FE_FREE                                                  $10
   13    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.99 ms | 1393 KiB | 13 Q