3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Example { private $test; public function __construct() { unset($this->test); } public function __set($name, $value) { echo "$name=$value"; } } $t = new Example(); $property = new ReflectionProperty($t, 'test'); $property->setAccessible(true); $property->setValue($t, 'foo');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gs1XL
function name:  (null)
number of ops:  16
compiled vars:  !0 = $t, !1 = $property
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $2      'Example'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   19     3        NEW                                                  $5      'ReflectionProperty'
          4        SEND_VAR_EX                                                  !0
          5        SEND_VAL_EX                                                  'test'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $5
   20     8        INIT_METHOD_CALL                                             !1, 'setAccessible'
          9        SEND_VAL_EX                                                  <true>
         10        DO_FCALL                                          0          
   21    11        INIT_METHOD_CALL                                             !1, 'setValue'
         12        SEND_VAR_EX                                                  !0
         13        SEND_VAL_EX                                                  'foo'
         14        DO_FCALL                                          0          
         15      > RETURN                                                       1

Class Example:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gs1XL
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   UNSET_OBJ                                                    'test'
    9     1      > RETURN                                                       null

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gs1XL
function name:  __set
number of ops:  7
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   13     2        ROPE_INIT                                         3  ~3      !0
          3        ROPE_ADD                                          1  ~3      ~3, '%3D'
          4        ROPE_END                                          2  ~2      ~3, !1
          5        ECHO                                                         ~2
   14     6      > RETURN                                                       null

End of function __set

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.42 ms | 2133 KiB | 13 Q