3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($a) { if ($a == 1) { return true; } else { return false; } } function bar($a) { if ($a == 1) { return true; } return false; } foo(2); bar(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tphhU
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 2
          2        DO_FCALL                                      0          
   19     3        INIT_FCALL                                               'bar'
          4        SEND_VAL                                                 2
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tphhU
function name:  foo
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_EQUAL                                                 !0, 1
          2      > JMPZ                                                     ~1, ->5
    5     3    > > RETURN                                                   <true>
          4*       JMP                                                      ->6
    7     5    > > RETURN                                                   <false>
    9     6*     > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tphhU
function name:  bar
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        IS_EQUAL                                                 !0, 1
          2      > JMPZ                                                     ~1, ->4
   13     3    > > RETURN                                                   <true>
   15     4    > > RETURN                                                   <false>
   16     5*     > RETURN                                                   null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.02 ms | 1403 KiB | 15 Q