3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __set($name, $value) { echo func_get_arg(0); $name = "xxx"; echo func_get_arg(0); } } $a = new A(); $a->test = 5;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pnEAu
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        ASSIGN_OBJ                                               !0, 'test'
          4        OP_DATA                                                  5
          5      > RETURN                                                   1

Class A:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pnEAu
function name:  __set
number of ops:  12
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'func_get_arg'
          3        SEND_VAL                                                 0
          4        DO_ICALL                                         $2      
          5        ECHO                                                     $2
    6     6        ASSIGN                                                   !0, 'xxx'
    7     7        INIT_FCALL                                               'func_get_arg'
          8        SEND_VAL                                                 0
          9        DO_ICALL                                         $4      
         10        ECHO                                                     $4
    8    11      > RETURN                                                   null

End of function __set

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.23 ms | 1395 KiB | 15 Q