3v4l.org

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

Class X:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qd70Q
function name:  __set
number of ops:  6
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        MUL                                              ~3      !1, 2
          3        ASSIGN_OBJ                                               'y'
          4        OP_DATA                                                  ~3
    9     5      > RETURN                                                   null

End of function __set

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161 ms | 1395 KiB | 15 Q