3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Notify { protected int $id; public function __set($name, $value) { echo __METHOD__ . PHP_EOL; if (property_exists($this, $name)) { $this->{$name} = $value; } return $this; } } $obj = new Notify(); $obj->id = 1; var_dump($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FZSap
function name:  (null)
number of ops:  9
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   NEW                                                  $1      'Notify'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   19     3        ASSIGN_OBJ                                                   !0, 'id'
          4        OP_DATA                                                      1
   21     5        INIT_FCALL                                                   'var_dump'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

Class Notify:
Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/FZSap
function name:  __set
number of ops:  11
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    8     2        ECHO                                                         'Notify%3A%3A__set%0A'
   10     3        FETCH_THIS                                           ~2      
          4        FRAMELESS_ICALL_2                property_exists      ~3      ~2, !0
          5      > JMPZ                                                         ~3, ->8
   11     6    >   ASSIGN_OBJ                                                   !0
          7        OP_DATA                                                      !1
   14     8    >   FETCH_THIS                                           ~5      
          9      > RETURN                                                       ~5
   15    10*     > RETURN                                                       null

End of function __set

End of class Notify.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.22 ms | 1717 KiB | 14 Q