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 ${"{$trim(\Constants::$use)}"}::a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fVQMI
function name:  (null)
number of ops:  13
compiled vars:  !0 = $trim
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'trim'
   12     1        INIT_DYNAMIC_CALL                                        !0
          2        CHECK_FUNC_ARG                                           
          3        FETCH_STATIC_PROP_FUNC_ARG   unknown             $2      'use'
          4        SEND_FUNC_ARG                                            $2
          5        DO_FCALL                                      0  $3      
          6        CAST                                          6  ~4      $3
          7        FETCH_R                      local               ~5      ~4
          8        FETCH_CLASS                                   0  $6      ~5
          9        INIT_STATIC_METHOD_CALL                                  $6, 'a'
         10        DO_FCALL                                      0  $7      
         11        ECHO                                                     $7
         12      > RETURN                                                   1

Class Car:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fVQMI
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:
168.48 ms | 1384 KiB | 13 Q