3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $a = 1; protected $b = 1; public function __set($key, $val) { $this->$key = $val; } } $f = new Foo(); $f->a = 2; $f->b = 2; print_r($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q83eX
function name:  (null)
number of ops:  11
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  2
   14     5        ASSIGN_OBJ                                               !0, 'b'
          6        OP_DATA                                                  2
   16     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Foo:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q83eX
function name:  __set
number of ops:  5
compiled vars:  !0 = $key, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        ASSIGN_OBJ                                               !0
          3        OP_DATA                                                  !1
    9     4      > RETURN                                                   null

End of function __set

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.98 ms | 1395 KiB | 15 Q