Created
August 14, 2023 19:54
-
-
Save Girgias/63d55ba1e50b580412b004046daed02b to your computer and use it in GitHub Desktop.
Minimum number of class types in a PHP build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NB: 148 | |
InternalIterator | |
Exception | |
ErrorException | |
Error | |
CompileError | |
ParseError | |
TypeError | |
ArgumentCountError | |
ValueError | |
ArithmeticError | |
DivisionByZeroError | |
UnhandledMatchError | |
Closure | |
Generator | |
ClosedGeneratorException | |
WeakReference | |
WeakMap | |
Attribute | |
ReturnTypeWillChange | |
AllowDynamicProperties | |
SensitiveParameter | |
SensitiveParameterValue | |
Override | |
Fiber | |
FiberError | |
stdClass | |
DateTime | |
DateTimeImmutable | |
DateTimeZone | |
DateInterval | |
DatePeriod | |
DateError | |
DateObjectError | |
DateRangeError | |
DateException | |
DateInvalidTimeZoneException | |
DateInvalidOperationException | |
DateMalformedStringException | |
DateMalformedIntervalStringException | |
DateMalformedPeriodStringException | |
HashContext | |
JsonException | |
Random\RandomError | |
Random\BrokenRandomEngineError | |
Random\RandomException | |
Random\Engine\Mt19937 | |
Random\Engine\PcgOneseq128XslRr64 | |
Random\Engine\Xoshiro256StarStar | |
Random\Engine\Secure | |
Random\Randomizer | |
Random\IntervalBoundary | |
ReflectionException | |
Reflection | |
ReflectionFunctionAbstract | |
ReflectionFunction | |
ReflectionGenerator | |
ReflectionParameter | |
ReflectionType | |
ReflectionNamedType | |
ReflectionUnionType | |
ReflectionIntersectionType | |
ReflectionMethod | |
ReflectionClass | |
ReflectionObject | |
ReflectionProperty | |
ReflectionClassConstant | |
ReflectionExtension | |
ReflectionZendExtension | |
ReflectionReference | |
ReflectionAttribute | |
ReflectionEnum | |
ReflectionEnumUnitCase | |
ReflectionEnumBackedCase | |
ReflectionFiber | |
__PHP_Incomplete_Class | |
AssertionError | |
php_user_filter | |
Directory | |
LogicException | |
BadFunctionCallException | |
BadMethodCallException | |
DomainException | |
InvalidArgumentException | |
LengthException | |
OutOfRangeException | |
RuntimeException | |
OutOfBoundsException | |
OverflowException | |
RangeException | |
UnderflowException | |
UnexpectedValueException | |
RecursiveIteratorIterator | |
IteratorIterator | |
FilterIterator | |
RecursiveFilterIterator | |
CallbackFilterIterator | |
RecursiveCallbackFilterIterator | |
ParentIterator | |
LimitIterator | |
CachingIterator | |
RecursiveCachingIterator | |
NoRewindIterator | |
AppendIterator | |
InfiniteIterator | |
RegexIterator | |
RecursiveRegexIterator | |
EmptyIterator | |
RecursiveTreeIterator | |
ArrayObject | |
ArrayIterator | |
RecursiveArrayIterator | |
SplFileInfo | |
DirectoryIterator | |
FilesystemIterator | |
RecursiveDirectoryIterator | |
GlobIterator | |
SplFileObject | |
SplTempFileObject | |
SplDoublyLinkedList | |
SplQueue | |
SplStack | |
SplHeap | |
SplMinHeap | |
SplMaxHeap | |
SplPriorityQueue | |
SplFixedArray | |
SplObjectStorage | |
MultipleIterator | |
Traversable | |
IteratorAggregate | |
Iterator | |
Serializable | |
ArrayAccess | |
Countable | |
Stringable | |
Throwable | |
UnitEnum | |
BackedEnum | |
DateTimeInterface | |
JsonSerializable | |
Random\Engine | |
Random\CryptoSafeEngine | |
Reflector | |
RecursiveIterator | |
OuterIterator | |
SeekableIterator | |
SplObserver | |
SplSubject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$class_types = [...get_declared_classes(), ...get_declared_interfaces(), ...get_declared_traits()]; | |
echo "NB: ", count($class_types), PHP_EOL; | |
$print = function ($str) {echo $str, PHP_EOL;}; | |
array_map($print, $class_types); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment