3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = null; if ($arr) echo '1'; if (!$arr) echo '2'; $arr = array(); if ($arr) echo '1'; if (!$arr) echo '2';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 9
Branch analysis from position: 6
Branch analysis from position: 3
filename:       /in/0gfg2
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, null
    4     1      > JMPZ                                                     !0, ->3
    5     2    >   ECHO                                                     '1'
    7     3    >   BOOL_NOT                                         ~2      !0
          4      > JMPZ                                                     ~2, ->6
    8     5    >   ECHO                                                     '2'
   10     6    >   ASSIGN                                                   !0, <array>
   12     7      > JMPZ                                                     !0, ->9
   13     8    >   ECHO                                                     '1'
   15     9    >   BOOL_NOT                                         ~4      !0
         10      > JMPZ                                                     ~4, ->12
   16    11    >   ECHO                                                     '2'
         12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.28 ms | 1393 KiB | 13 Q