3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 25; } class Bar extends Foo { } $one = new ReflectionClass('Foo'); var_dump($one->hasProperty('bar')); $two = new ReflectionClass('Bar'); var_dump($two->hasProperty('bar'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r2vq5
function name:  (null)
number of ops:  21
compiled vars:  !0 = $one, !1 = $two
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    6     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'hasProperty'
          6        SEND_VAL_EX                                              'bar'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
    7    10        NEW                                              $7      'ReflectionClass'
         11        SEND_VAL_EX                                              'Bar'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !1, $7
    8    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !1, 'hasProperty'
         16        SEND_VAL_EX                                              'bar'
         17        DO_FCALL                                      0  $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.22 ms | 1386 KiB | 15 Q