3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Henk\Test; class TestGetClass { public function getMe() { var_dump(get_called_class()); } } class B extends TestGetClass { } $b = new B(); $b->getMe();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2SH6c
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Henk%5CTest%5CB'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'getMe'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Henk\Test\TestGetClass:
Function getme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2SH6c
function name:  getMe
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_NS_FCALL_BY_NAME                                    'Henk%5CTest%5Cvar_dump'
          1        INIT_NS_FCALL_BY_NAME                                    'Henk%5CTest%5Cget_called_class'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
    8     5      > RETURN                                                   null

End of function getme

End of class Henk\Test\TestGetClass.

Class Henk\Test\B:
Function getme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2SH6c
function name:  getMe
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_NS_FCALL_BY_NAME                                    'Henk%5CTest%5Cvar_dump'
          1        INIT_NS_FCALL_BY_NAME                                    'Henk%5CTest%5Cget_called_class'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
    8     5      > RETURN                                                   null

End of function getme

End of class Henk\Test\B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.32 ms | 1395 KiB | 17 Q