3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class MyTest { function a() { var_dump([ '__CLASS__' => __CLASS__, 'get_class()' => get_class($this), 'reflection' => (new \ReflectionClass($this))->getShortName() ]); } } $myTest = new MyTest(); $myTest->a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k95MQ
function name:  (null)
number of ops:  6
compiled vars:  !0 = $myTest
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Test%5CMyTest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'a'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test\MyTest:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k95MQ
function name:  a
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_NS_FCALL_BY_NAME                                    'Test%5Cvar_dump'
    8     1        INIT_ARRAY                                       ~0      'Test%5CMyTest', '__CLASS__'
    9     2        INIT_NS_FCALL_BY_NAME                                    'Test%5Cget_class'
          3        FETCH_THIS                                       $1      
          4        SEND_VAR_EX                                              $1
          5        DO_FCALL                                      0  $2      
          6        ADD_ARRAY_ELEMENT                                ~0      $2, 'get_class%28%29'
   10     7        NEW                                              $3      'ReflectionClass'
          8        FETCH_THIS                                       $4      
          9        SEND_VAR_EX                                              $4
         10        DO_FCALL                                      0          
         11        INIT_METHOD_CALL                                         $3, 'getShortName'
         12        DO_FCALL                                      0  $6      
         13        ADD_ARRAY_ELEMENT                                ~0      $6, 'reflection'
         14        SEND_VAL_EX                                              ~0
         15        DO_FCALL                                      0          
   12    16      > RETURN                                                   null

End of function a

End of class Test\MyTest.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.02 ms | 1395 KiB | 17 Q