3v4l.org

run code in 500+ PHP versions simultaneously
<?php class SetterTester { public function __get($name) { echo "__get({$name})\n"; } public function __set($name, $value) { echo "__set({$name}, {$value})\n"; } } echo "Test array version", PHP_EOL; $test = new SetterTester(); $test->property["index"] = "Some value";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1EbcC
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                         'Test+array+version'
          1        ECHO                                                         '%0A'
   13     2        NEW                                                  $1      'SetterTester'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   14     5        FETCH_OBJ_W                                          $4      !0, 'property'
          6        ASSIGN_DIM                                                   $4, 'index'
          7        OP_DATA                                                      'Some+value'
          8      > RETURN                                                       1

Class SetterTester:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1EbcC
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    5     1        ROPE_INIT                                         3  ~2      '__get%28'
          2        ROPE_ADD                                          1  ~2      ~2, !0
          3        ROPE_END                                          2  ~1      ~2, '%29%0A'
          4        ECHO                                                         ~1
    6     5      > RETURN                                                       null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1EbcC
function name:  __set
number of ops:  9
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    8     2        ROPE_INIT                                         5  ~3      '__set%28'
          3        ROPE_ADD                                          1  ~3      ~3, !0
          4        ROPE_ADD                                          2  ~3      ~3, '%2C+'
          5        ROPE_ADD                                          3  ~3      ~3, !1
          6        ROPE_END                                          4  ~2      ~3, '%29%0A'
          7        ECHO                                                         ~2
    9     8      > RETURN                                                       null

End of function __set

End of class SetterTester.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.46 ms | 1559 KiB | 8 Q