3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __set($name, $value) { echo "__set()\n"; $this->$name = $value; } } function foo($bar) { $bar->{'some_weird_variable'} = 'some value'; $bar->{"\1\0Test\0another"} = 'one'; } $obj = new Test(); foo($obj); var_dump($obj->{'some_weird_variable'});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8KkTh
function name:  (null)
number of ops:  11
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'foo'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   16     6        INIT_FCALL                                               'var_dump'
          7        FETCH_OBJ_R                                      ~5      !0, 'some_weird_variable'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8KkTh
function name:  foo
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               !0, 'some_weird_variable'
          2        OP_DATA                                                  'some+value'
   11     3        ASSIGN_OBJ                                               !0, '%01%00Test%00another'
          4        OP_DATA                                                  'one'
   12     5      > RETURN                                                   null

End of function foo

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

End of function __set

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.3 ms | 1399 KiB | 16 Q