3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Ugly\Shit; class Foo { public static function getClass() { return get_called_class(); } } class Bar extends Foo {} class Lorem { public static function getFooClass() { return Foo::getClass(); } public function __construct() { echo static::getFooClass(); } } class Ipsum extends Lorem { public static function getFooClass() { return Bar::getClass(); } } $ipsum = new Ipsum();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2p62v
function name:  (null)
number of ops:  4
compiled vars:  !0 = $ipsum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Ugly%5CShit%5CIpsum'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class Ugly\Shit\Foo:
Function getclass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2p62v
function name:  getClass
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_NS_FCALL_BY_NAME                                    'Ugly%5CShit%5Cget_called_class'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    7     3*     > RETURN                                                   null

End of function getclass

End of class Ugly\Shit\Foo.

Class Ugly\Shit\Bar:
Function getclass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2p62v
function name:  getClass
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_NS_FCALL_BY_NAME                                    'Ugly%5CShit%5Cget_called_class'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    7     3*     > RETURN                                                   null

End of function getclass

End of class Ugly\Shit\Bar.

Class Ugly\Shit\Lorem:
Function getfooclass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2p62v
function name:  getFooClass
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'Ugly%5CShit%5CFoo', 'getClass'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
   14     3*     > RETURN                                                   null

End of function getfooclass

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2p62v
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'getFooClass'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   18     3      > RETURN                                                   null

End of function __construct

End of class Ugly\Shit\Lorem.

Class Ugly\Shit\Ipsum:
Function getfooclass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2p62v
function name:  getFooClass
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'Ugly%5CShit%5CBar', 'getClass'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
   23     3*     > RETURN                                                   null

End of function getfooclass

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2p62v
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'getFooClass'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   18     3      > RETURN                                                   null

End of function __construct

End of class Ugly\Shit\Ipsum.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.39 ms | 1400 KiB | 15 Q