3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Example; class Test { public function whoAmI() { return static::class; } } $class = 'Example\Test'; var_dump($what::whoAmI());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RvJcP
function name:  (null)
number of ops:  8
compiled vars:  !0 = $class, !1 = $what
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'Example%5CTest'
   12     1        INIT_NS_FCALL_BY_NAME                                    'Example%5Cvar_dump'
          2        FETCH_CLASS                                   0  $3      !1
          3        INIT_STATIC_METHOD_CALL                                  $3, 'whoAmI'
          4        DO_FCALL                                      0  $4      
          5        SEND_VAR_NO_REF_EX                                       $4
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function whoami

End of class Example\Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.55 ms | 1394 KiB | 15 Q