3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model { public static function test() { echo "it works\n"; } } class ModelName { public function getModelName() { return 'Model'; } } $modelName = new ModelName; $$modelName->getModelName()::test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLAvB
function name:  (null)
number of ops:  10
compiled vars:  !0 = $modelName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'ModelName'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        FETCH_R                      local               ~4      !0
          4        INIT_METHOD_CALL                                         ~4, 'getModelName'
          5        DO_FCALL                                      0  $5      
          6        FETCH_CLASS                                   0  $6      $5
          7        INIT_STATIC_METHOD_CALL                                  $6, 'test'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function test

End of class Model.

Class ModelName:
Function getmodelname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLAvB
function name:  getModelName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'Model'
   11     1*     > RETURN                                                   null

End of function getmodelname

End of class ModelName.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.63 ms | 1394 KiB | 13 Q