3v4l.org

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

Class PhpClassWithPropertyDefaults: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.65 ms | 1395 KiB | 15 Q