3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test1 { } $test1 = new test1(); $test1->foo->bar = 42; var_dump($test1); echo PHP_EOL . PHP_EOL; class test2 { public $foo; } $test2 = new test2(); $test2->foo->bar = 42; var_dump($test2); echo PHP_EOL . PHP_EOL; class test3 { public $foo; } $test3 = new test3(); $test3->foo->bar['nope'] = 42; var_dump($test3); echo PHP_EOL . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ckkUh
function name:  (null)
number of ops:  32
compiled vars:  !0 = $test1, !1 = $test2, !2 = $test3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'test1'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    8     3        FETCH_OBJ_W                                      $6      !0, 'foo'
          4        ASSIGN_OBJ                                               $6, 'bar'
          5        OP_DATA                                                  42
   10     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   11     9        ECHO                                                     '%0A%0A'
   20    10        NEW                                              $9      'test2'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $9
   21    13        FETCH_OBJ_W                                      $12     !1, 'foo'
         14        ASSIGN_OBJ                                               $12, 'bar'
         15        OP_DATA                                                  42
   23    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   24    19        ECHO                                                     '%0A%0A'
   33    20        NEW                                              $15     'test3'
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !2, $15
   34    23        FETCH_OBJ_W                                      $18     !2, 'foo'
         24        FETCH_OBJ_W                                      $19     $18, 'bar'
         25        ASSIGN_DIM                                               $19, 'nope'
         26        OP_DATA                                                  42
   36    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
   37    30        ECHO                                                     '%0A%0A'
   38    31      > RETURN                                                   1

Class test1: [no user functions]
Class test2: [no user functions]
Class test3: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.84 ms | 1396 KiB | 15 Q