3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "\nReproduction\n"; class Legacy {} $a = new Legacy; $a->foo = 'bar'; echo "\nTest with Attribute\n"; #[\AllowDynamicProperties] class TestWithAttribute {} class TestChildOne extends TestWithAttribute {} $testWithAttribute = new TestWithAttribute(); $testWithAttribute->foo = 'bar'; echo "\nTest with Attribute (child class)\n"; $testChildOne = new TestChildOne(); $testChildOne->foo = 'bar'; echo "\nTest extending stdClass\n"; class TestWithStdClass extends stdClass {} class TestChildTwo extends TestWithStdClass {} $testWithAttribute = new TestWithStdClass(); $testWithAttribute->foo = 'bar'; echo "\nTest extending stdClass (child class)\n"; $testChildOne = new TestChildTwo(); $testChildOne->foo = 'bar';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fp9h8
function name:  (null)
number of ops:  31
compiled vars:  !0 = $a, !1 = $testWithAttribute, !2 = $testChildOne
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '%0AReproduction%0A'
    7     1        NEW                                              $3      'Legacy'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    8     4        ASSIGN_OBJ                                               !0, 'foo'
          5        OP_DATA                                                  'bar'
   10     6        ECHO                                                     '%0ATest+with+Attribute%0A'
   17     7        NEW                                              $7      'TestWithAttribute'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
   18    10        ASSIGN_OBJ                                               !1, 'foo'
         11        OP_DATA                                                  'bar'
   20    12        ECHO                                                     '%0ATest+with+Attribute+%28child+class%29%0A'
   22    13        NEW                                              $11     'TestChildOne'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !2, $11
   23    16        ASSIGN_OBJ                                               !2, 'foo'
         17        OP_DATA                                                  'bar'
   25    18        ECHO                                                     '%0ATest+extending+stdClass%0A'
   31    19        NEW                                              $15     'TestWithStdClass'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !1, $15
   32    22        ASSIGN_OBJ                                               !1, 'foo'
         23        OP_DATA                                                  'bar'
   34    24        ECHO                                                     '%0ATest+extending+stdClass+%28child+class%29%0A'
   36    25        NEW                                              $19     'TestChildTwo'
         26        DO_FCALL                                      0          
         27        ASSIGN                                                   !2, $19
   37    28        ASSIGN_OBJ                                               !2, 'foo'
         29        OP_DATA                                                  'bar'
         30      > RETURN                                                   1

Class Legacy: [no user functions]
Class TestWithAttribute: [no user functions]
Class TestChildOne: [no user functions]
Class TestWithStdClass: [no user functions]
Class TestChildTwo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.65 ms | 1003 KiB | 13 Q