3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = 2; if ($a < $b) { function foo() { return $a; } } else { function foo() { return $b; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kjDp6
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, 2
    6     2        IS_SMALLER                                               !0, !1
          3      > JMPZ                                                     ~4, ->6
    7     4    >   DECLARE_FUNCTION                                         'foo'
    9     5      > JMP                                                      ->7
   11     6    >   DECLARE_FUNCTION                                         'foo'
   14     7    > > RETURN                                                   1

Function %00foo%2Fin%2FkjDp6%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kjDp6
function name:  foo
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   !0
    9     1*     > RETURN                                                   null

End of function %00foo%2Fin%2FkjDp6%3A7%240

Function %00foo%2Fin%2FkjDp6%3A11%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kjDp6
function name:  foo
number of ops:  2
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   !0
   13     1*     > RETURN                                                   null

End of function %00foo%2Fin%2FkjDp6%3A11%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.72 ms | 1394 KiB | 13 Q