3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car{ public static function a(){ return 'hi'; } } class Constants{ public static $use='Car'; } $trim = 'trim'; echo ${Constants::$use}::a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DLnss
function name:  (null)
number of ops:  8
compiled vars:  !0 = $trim
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'trim'
   12     1        FETCH_STATIC_PROP_R          unknown             ~2      'use'
          2        FETCH_R                      local               ~3      ~2
          3        FETCH_CLASS                                   0  $4      ~3
          4        INIT_STATIC_METHOD_CALL                                  $4, 'a'
          5        DO_FCALL                                      0  $5      
          6        ECHO                                                     $5
          7      > RETURN                                                   1

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

End of function a

End of class Car.

Class Constants: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.08 ms | 1393 KiB | 13 Q