3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $foo; class testing { public $prop = 'property'; } $t = new testing(); echo "Normal prop: ".$t->prop."\n"; echo "Dynamic prop: ".$t->prop2."\n"; $t->prop2 = 'dynamic prop'; echo "Dynamic prop: ".$t->prop2."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dgOYV
function name:  (null)
number of ops:  19
compiled vars:  !0 = $foo, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     !0
    9     1        NEW                                              $2      'testing'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $2
   10     4        FETCH_OBJ_R                                      ~5      !1, 'prop'
          5        CONCAT                                           ~6      'Normal+prop%3A+', ~5
          6        CONCAT                                           ~7      ~6, '%0A'
          7        ECHO                                                     ~7
   11     8        FETCH_OBJ_R                                      ~8      !1, 'prop2'
          9        CONCAT                                           ~9      'Dynamic+prop%3A+', ~8
         10        CONCAT                                           ~10     ~9, '%0A'
         11        ECHO                                                     ~10
   12    12        ASSIGN_OBJ                                               !1, 'prop2'
         13        OP_DATA                                                  'dynamic+prop'
   13    14        FETCH_OBJ_R                                      ~12     !1, 'prop2'
         15        CONCAT                                           ~13     'Dynamic+prop%3A+', ~12
         16        CONCAT                                           ~14     ~13, '%0A'
         17        ECHO                                                     ~14
         18      > RETURN                                                   1

Class testing: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.96 ms | 994 KiB | 13 Q