3v4l.org

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

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

End of function __set

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.83 ms | 1395 KiB | 15 Q