3v4l.org

run code in 300+ PHP versions simultaneously
<?php class nombreclase { function __construct() { echo __METHOD__,"\n"; } } function nombrefunc() { echo __FUNCTION__,"\n"; } const nombreconst = "global"; $a = 'nombreclase'; $obj = new $a; // imprime nombreclase::__construct $b = 'nombrefunc'; $b(); // imprime nombrefunc echo constant('nombreconst'), "\n"; // imprime global ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ln3Md
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $obj, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CONST                                            'nombreconst', 'global'
   15     1        ASSIGN                                                   !0, 'nombreclase'
   16     2        FETCH_CLASS                                   0  $4      !0
          3        NEW                                              $5      $4
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   17     6        ASSIGN                                                   !2, 'nombrefunc'
   18     7        INIT_DYNAMIC_CALL                                        !2
          8        DO_FCALL                                      0          
   19     9        INIT_FCALL                                               'constant'
         10        SEND_VAL                                                 'nombreconst'
         11        DO_ICALL                                         $10     
         12        ECHO                                                     $10
         13        ECHO                                                     '%0A'
   20    14      > RETURN                                                   1

Function nombrefunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ln3Md
function name:  nombrefunc
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'nombrefunc'
          1        ECHO                                                     '%0A'
   12     2      > RETURN                                                   null

End of function nombrefunc

Class nombreclase:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ln3Md
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'nombreclase%3A%3A__construct'
          1        ECHO                                                     '%0A'
    7     2      > RETURN                                                   null

End of function __construct

End of class nombreclase.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.18 ms | 1387 KiB | 15 Q