3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { static function bananaPhone() { return static::class; } } class Example extends Base { } $what = 'Example'; var_dump($what::bananaPhone());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RFPNS
function name:  (null)
number of ops:  8
compiled vars:  !0 = $what
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 'Example'
   14     1        INIT_FCALL                                               'var_dump'
          2        FETCH_CLASS                                   0  $2      !0
          3        INIT_STATIC_METHOD_CALL                                  $2, 'bananaPhone'
          4        DO_FCALL                                      0  $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function bananaphone

End of class Base.

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

End of function bananaphone

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.69 ms | 1399 KiB | 15 Q