<?php
class Foo extends \IntlCalendar
{
}
$fooReflection = new \ReflectionClass(\Foo::class);
$intlGregorianCalendarReflection = new \ReflectionClass(\IntlGregorianCalendar::class);
printf("%d constants in %s\n", count($fooReflection->getConstants()), \Foo::class);
if ($fooReflection->getParentClass()) {
printf("%s extends %s\n", Foo::class, $fooReflection->getParentClass()->getName());
}
printf("%d constants in %s\n", 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);
preferences:
60.55 ms | 402 KiB | 5 Q