3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(?int $foo, int $bar): void { if ( $foo && $foo !== 1 || !$foo && $bar ) { return; } if ($foo === null) { echo "Not redundant!"; } } foo(null, 0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0M9Z3
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 null
          2        SEND_VAL                                                 0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 46) 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
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
Branch analysis from position: 9
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/0M9Z3
function name:  foo
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2      > JMPZ_EX                                          ~2      !0, ->5
          3    >   IS_NOT_IDENTICAL                                 ~3      !0, 1
          4        BOOL                                             ~2      ~3
          5    > > JMPNZ_EX                                         ~2      ~2, ->10
    6     6    >   BOOL_NOT                                         ~4      !0
          7      > JMPZ_EX                                          ~4      ~4, ->9
          8    >   BOOL                                             ~4      !1
          9    >   BOOL                                             ~2      ~4
         10    > > JMPZ                                                     ~2, ->12
    8    11    > > RETURN                                                   null
   11    12    >   TYPE_CHECK                                    2          !0
         13      > JMPZ                                                     ~5, ->15
   12    14    >   ECHO                                                     'Not+redundant%21'
   14    15    > > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.89 ms | 1434 KiB | 14 Q