3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Animal{ static public function name() {return 'animal';} static public function sayHello () {return 'Hello, I\'m ' . static::name();} } class Dog extends Animal{ static public function name() {return 'dog';} } function blah($someAnimal){ echo $someAnimal::sayHello(); } blah('Dog');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uV73d
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'blah'
          1        SEND_VAL                                                 'Dog'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function blah:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uV73d
function name:  blah
number of ops:  6
compiled vars:  !0 = $someAnimal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        FETCH_CLASS                                   0  $1      !0
          2        INIT_STATIC_METHOD_CALL                                  $1, 'sayHello'
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   14     5      > RETURN                                                   null

End of function blah

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

End of function name

Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uV73d
function name:  sayHello
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  'name'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Hello%2C+I%27m+', $0
          3      > RETURN                                                   ~1
          4*     > RETURN                                                   null

End of function sayhello

End of class Animal.

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

End of function name

Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uV73d
function name:  sayHello
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  'name'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Hello%2C+I%27m+', $0
          3      > RETURN                                                   ~1
          4*     > RETURN                                                   null

End of function sayhello

End of class Dog.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.94 ms | 1403 KiB | 14 Q