3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { return 5; } $z = 50; if ($x=foo() || $z == 50) { echo "blah"; } echo $x;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 6
filename:       /in/8QkG7
function name:  (null)
number of ops:  11
compiled vars:  !0 = $z, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 50
   10     1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $3      
          3      > JMPNZ_EX                                         ~4      $3, ->6
          4    >   IS_EQUAL                                         ~5      !0, 50
          5        BOOL                                             ~4      ~5
          6    >   ASSIGN                                           ~6      !1, ~4
          7      > JMPZ                                                     ~6, ->9
   11     8    >   ECHO                                                     'blah'
   14     9    >   ECHO                                                     !1
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8QkG7
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   5
    6     1*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.37 ms | 1389 KiB | 14 Q