3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo extends bar { public function start() { parent::yeeha(); } } class bar { public function yeeha() { print_r(get_called_class()); } } $foo = new foo(); $foo->start();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/56FgH
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'foo', 'bar'
   18     1        NEW                                              $1      'foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   19     4        INIT_METHOD_CALL                                         !0, 'start'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class foo:
Function start:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/56FgH
function name:  start
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_STATIC_METHOD_CALL                                  'yeeha'
          1        DO_FCALL                                      0          
    7     2      > RETURN                                                   null

End of function start

End of class foo.

Class bar:
Function yeeha:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/56FgH
function name:  yeeha
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'print_r'
          1        GET_CALLED_CLASS                                 ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   15     4      > RETURN                                                   null

End of function yeeha

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.96 ms | 1395 KiB | 15 Q