3v4l.org

run code in 500+ PHP versions simultaneously
<?php class MyClass { public static $myStaticProperty; public $myInstanceProperty; } $staticPropertyName = 'myStaticProperty'; $instancePropertyName = 'myInstanceProperty'; MyClass::${$staticPropertyName} = 'my static value'; $obj = new MyClass(); $obj->{$instancePropertyName} = 'my instance value'; var_dump(MyClass::${$staticPropertyName}); var_dump($obj->{$instancePropertyName});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K7U3Q
function name:  (null)
number of ops:  18
compiled vars:  !0 = $staticPropertyName, !1 = $instancePropertyName, !2 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, 'myStaticProperty'
    8     1        ASSIGN                                                       !1, 'myInstanceProperty'
   10     2        ASSIGN_STATIC_PROP                                           !0, 'MyClass'
          3        OP_DATA                                                      'my+static+value'
   11     4        NEW                                                  $6      'MyClass'
          5        DO_FCALL                                          0          
          6        ASSIGN                                                       !2, $6
   12     7        ASSIGN_OBJ                                                   !2, !1
          8        OP_DATA                                                      'my+instance+value'
   14     9        INIT_FCALL                                                   'var_dump'
         10        FETCH_STATIC_PROP_R              unknown             ~10     !0
         11        SEND_VAL                                                     ~10
         12        DO_ICALL                                                     
   15    13        INIT_FCALL                                                   'var_dump'
         14        FETCH_OBJ_R                                          ~12     !2, !1
         15        SEND_VAL                                                     ~12
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.11 ms | 3051 KiB | 14 Q