3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends \IntlCalendar { } $fooReflection = new \ReflectionClass(\Foo::class); $intlGregorianCalendarReflection = new \ReflectionClass(\IntlGregorianCalendar::class); printf("%d constants in %s, ", count($fooReflection->getConstants()), \Foo::class); if ($fooReflection->getParentClass()) { printf("%s extends %s\n", Foo::class, $fooReflection->getParentClass()->getName()); } printf("%d constants in %s, ", count($intlGregorianCalendarReflection->getConstants()), \IntlGregorianCalendar::class); if ($intlGregorianCalendarReflection->getParentClass()) { printf("%s extends %s\n", \IntlGregorianCalendar::class, $intlGregorianCalendarReflection->getParentClass()->getName()); } printf("%d constants in %s\n", count((new \ReflectionClass(\IntlCalendar::class))->getConstants()), \IntlCalendar::class);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 29
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 49
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
Branch analysis from position: 29
filename:       /in/N8Ets
function name:  (null)
number of ops:  61
compiled vars:  !0 = $fooReflection, !1 = $intlGregorianCalendarReflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'foo', 'intlcalendar'
    8     1        NEW                                              $2      'ReflectionClass'
          2        SEND_VAL_EX                                              'Foo'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    9     5        NEW                                              $5      'ReflectionClass'
          6        SEND_VAL_EX                                              'IntlGregorianCalendar'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $5
   11     9        INIT_FCALL                                               'printf'
         10        SEND_VAL                                                 '%25d+constants+in+%25s%2C+'
         11        INIT_METHOD_CALL                                         !0, 'getConstants'
         12        DO_FCALL                                      0  $8      
         13        COUNT                                            ~9      $8
         14        SEND_VAL                                                 ~9
         15        SEND_VAL                                                 'Foo'
         16        DO_ICALL                                                 
   12    17        INIT_METHOD_CALL                                         !0, 'getParentClass'
         18        DO_FCALL                                      0  $11     
         19      > JMPZ                                                     $11, ->29
   13    20    >   INIT_FCALL                                               'printf'
         21        SEND_VAL                                                 '%25s+extends+%25s%0A'
         22        SEND_VAL                                                 'Foo'
         23        INIT_METHOD_CALL                                         !0, 'getParentClass'
         24        DO_FCALL                                      0  $12     
         25        INIT_METHOD_CALL                                         $12, 'getName'
         26        DO_FCALL                                      0  $13     
         27        SEND_VAR                                                 $13
         28        DO_ICALL                                                 
   15    29    >   INIT_FCALL                                               'printf'
         30        SEND_VAL                                                 '%25d+constants+in+%25s%2C+'
         31        INIT_METHOD_CALL                                         !1, 'getConstants'
         32        DO_FCALL                                      0  $15     
         33        COUNT                                            ~16     $15
         34        SEND_VAL                                                 ~16
         35        SEND_VAL                                                 'IntlGregorianCalendar'
         36        DO_ICALL                                                 
   16    37        INIT_METHOD_CALL                                         !1, 'getParentClass'
         38        DO_FCALL                                      0  $18     
         39      > JMPZ                                                     $18, ->49
   17    40    >   INIT_FCALL                                               'printf'
         41        SEND_VAL                                                 '%25s+extends+%25s%0A'
         42        SEND_VAL                                                 'IntlGregorianCalendar'
         43        INIT_METHOD_CALL                                         !1, 'getParentClass'
         44        DO_FCALL                                      0  $19     
         45        INIT_METHOD_CALL                                         $19, 'getName'
         46        DO_FCALL                                      0  $20     
         47        SEND_VAR                                                 $20
         48        DO_ICALL                                                 
   19    49    >   INIT_FCALL                                               'printf'
         50        SEND_VAL                                                 '%25d+constants+in+%25s%0A'
         51        NEW                                              $22     'ReflectionClass'
         52        SEND_VAL_EX                                              'IntlCalendar'
         53        DO_FCALL                                      0          
         54        INIT_METHOD_CALL                                         $22, 'getConstants'
         55        DO_FCALL                                      0  $24     
         56        COUNT                                            ~25     $24
         57        SEND_VAL                                                 ~25
         58        SEND_VAL                                                 'IntlCalendar'
         59        DO_ICALL                                                 
         60      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.83 ms | 1400 KiB | 15 Q