3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { private array $data = []; public function __set($name, $value) { $this->data[$name] = $value; } public function __isset($name) { return isset($this->data[$name]); } public function __unset($name) { unset($this->data[$name]); } } $foo = new Foo(); $foo->__set(1, 'one'); $foo->__set(2, 'two'); var_dump( $foo->__isset(1), // true $foo->__isset(2) // true ); $foo->__unset(1); var_dump( $foo->__isset(1) // false );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0VmYQ
function name:  (null)
number of ops:  31
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, '__set'
          4        SEND_VAL_EX                                              1
          5        SEND_VAL_EX                                              'one'
          6        DO_FCALL                                      0          
   26     7        INIT_METHOD_CALL                                         !0, '__set'
          8        SEND_VAL_EX                                              2
          9        SEND_VAL_EX                                              'two'
         10        DO_FCALL                                      0          
   28    11        INIT_FCALL                                               'var_dump'
   29    12        INIT_METHOD_CALL                                         !0, '__isset'
         13        SEND_VAL_EX                                              1
         14        DO_FCALL                                      0  $6      
         15        SEND_VAR                                                 $6
   30    16        INIT_METHOD_CALL                                         !0, '__isset'
         17        SEND_VAL_EX                                              2
         18        DO_FCALL                                      0  $7      
         19        SEND_VAR                                                 $7
   28    20        DO_ICALL                                                 
   33    21        INIT_METHOD_CALL                                         !0, '__unset'
         22        SEND_VAL_EX                                              1
         23        DO_FCALL                                      0          
   35    24        INIT_FCALL                                               'var_dump'
   36    25        INIT_METHOD_CALL                                         !0, '__isset'
         26        SEND_VAL_EX                                              1
         27        DO_FCALL                                      0  $10     
         28        SEND_VAR                                                 $10
   35    29        DO_ICALL                                                 
   37    30      > RETURN                                                   1

Class Foo:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0VmYQ
function name:  __set
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        FETCH_OBJ_W                                      $2      'data'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
   10     5      > RETURN                                                   null

End of function __set

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0VmYQ
function name:  __isset
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        FETCH_OBJ_IS                                     ~1      'data'
          2        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, !0
          3      > RETURN                                                   ~2
   15     4*     > RETURN                                                   null

End of function __isset

Function __unset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0VmYQ
function name:  __unset
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        FETCH_OBJ_UNSET                                  $1      'data'
          2        UNSET_DIM                                                $1, !0
   20     3      > RETURN                                                   null

End of function __unset

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.8 ms | 1003 KiB | 14 Q