3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Exp { public function x();} class First implements Exp { public function x() {} } class Second {} function x(Exp $e){ echo get_class($e)."\n"; } x(new First); x(new Second); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qZU6F
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'first'
   10     1        INIT_FCALL                                               'x'
          2        NEW                                              $0      'First'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $0
          5        DO_FCALL                                      0          
   11     6        INIT_FCALL                                               'x'
          7        NEW                                              $3      'Second'
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $3
         10        DO_FCALL                                      0          
   12    11      > RETURN                                                   1

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qZU6F
function name:  x
number of ops:  5
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        GET_CLASS                                        ~1      !0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
    9     4      > RETURN                                                   null

End of function x

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

End of function x

End of class Exp.

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

End of function x

End of class First.

Class Second: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.38 ms | 1399 KiB | 15 Q