3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function f() { return false; } } $a = new A(); function f(A $a) { if ($a->f()) { echo 1; } else { echo 0; } } f(null);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NYjPP
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_FCALL                                               'f'
          4        SEND_VAL                                                 null
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function f:
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/NYjPP
function name:  f
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_METHOD_CALL                                         !0, 'f'
          2        DO_FCALL                                      0  $1      
          3      > JMPZ                                                     $1, ->6
   13     4    >   ECHO                                                     1
          5      > JMP                                                      ->7
   15     6    >   ECHO                                                     0
   18     7    > > RETURN                                                   null

End of function f

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

End of function f

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.43 ms | 1398 KiB | 14 Q