3v4l.org

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

Class PhpClassWithPropertyDefaults: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1394 KiB | 15 Q