3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $prop = 42; public function __set($x, $y) { echo "SET\n"; $this->$x = $y; } } $a = new A(); var_dump($a); unset($a->prop); echo "Wait for it ... "; $a->prop = 42;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vgoUb
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   16     6        UNSET_OBJ                                                !0, 'prop'
   18     7        ECHO                                                     'Wait+for+it+...+'
   20     8        ASSIGN_OBJ                                               !0, 'prop'
          9        OP_DATA                                                  42
   21    10      > RETURN                                                   1

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

End of function __set

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.4 ms | 999 KiB | 14 Q