3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SetterTester { public function __set($name, $value) { echo 'Setter is used', PHP_EOL, PHP_EOL; } } // echo "Test normal version", PHP_EOL; // $test = new SetterTester(); // $test->property = "Some value"; 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/7qOqt
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Test+array+version'
          1        ECHO                                                     '%0A'
   16     2        NEW                                              $1      'SetterTester'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   17     5        FETCH_CONSTANT                                   ~4      'property'
          6        FETCH_DIM_R                                      ~5      ~4, 'index'
          7        ASSIGN_OBJ                                               !0, ~5
          8        OP_DATA                                                  'Some+value'
          9      > RETURN                                                   1

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

End of function __set

End of class SetterTester.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.7 ms | 1393 KiB | 13 Q