3v4l.org

run code in 300+ 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 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/FZSap
function name:  __set
number of ops:  14
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        INIT_FCALL                                               'property_exists'
          4        FETCH_THIS                                       ~2      
          5        SEND_VAL                                                 ~2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8      > JMPZ                                                     $3, ->11
   11     9    >   ASSIGN_OBJ                                               !0
         10        OP_DATA                                                  !1
   14    11    >   FETCH_THIS                                       ~5      
         12      > RETURN                                                   ~5
   15    13*     > RETURN                                                   null

End of function __set

End of class Notify.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.94 ms | 999 KiB | 15 Q