3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $b; }; $a = new A; $rp = new ReflectionProperty($a, "b"); var_dump($rp->isInitialized($a)); $a->b; // Remains silent unset($a->b); var_dump($rp->isInitialized($a)); $a->b; // Cause a "Notice: Undefined property A::$b"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ipqhf
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $rp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    6     3        NEW                                              $5      'ReflectionProperty'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAL_EX                                              'b'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'isInitialized'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
    9    14        FETCH_OBJ_R                                      ~10     !0, 'b'
         15        FREE                                                     ~10
   11    16        UNSET_OBJ                                                !0, 'b'
   13    17        INIT_FCALL                                               'var_dump'
         18        INIT_METHOD_CALL                                         !1, 'isInitialized'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
   14    23        FETCH_OBJ_R                                      ~13     !0, 'b'
         24        FREE                                                     ~13
         25      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.7 ms | 1400 KiB | 15 Q