3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ThisIsAwful { public static function is($val) { define(__CLASS__, $val); } } spl_autoload_register(function($class) { eval("class $class extends ThisIsAwful {}"); }, true, true); You::is('awful'); var_dump(You); This::is('awful'); var_dump(This);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fio3g
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Ffio3g%3A8%240'
   10     2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 <true>
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                                 
   12     6        INIT_STATIC_METHOD_CALL                                  'You', 'is'
          7        SEND_VAL_EX                                              'awful'
          8        DO_FCALL                                      0          
   13     9        INIT_FCALL                                               'var_dump'
         10        FETCH_CONSTANT                                   ~3      'You'
         11        SEND_VAL                                                 ~3
         12        DO_ICALL                                                 
   15    13        INIT_STATIC_METHOD_CALL                                  'This', 'is'
         14        SEND_VAL_EX                                              'awful'
         15        DO_FCALL                                      0          
   16    16        INIT_FCALL                                               'var_dump'
         17        FETCH_CONSTANT                                   ~6      'This'
         18        SEND_VAL                                                 ~6
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Ffio3g%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fio3g
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ROPE_INIT                                     3  ~2      'class+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '+extends+ThisIsAwful+%7B%7D'
          4        INCLUDE_OR_EVAL                                          ~1, EVAL
   10     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Ffio3g%3A8%240

Class ThisIsAwful:
Function is:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fio3g
function name:  is
number of ops:  6
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'ThisIsAwful'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    5     5      > RETURN                                                   null

End of function is

End of class ThisIsAwful.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.17 ms | 1396 KiB | 19 Q