PHP 8.5: native classes with static methods

raw

static-php-methods.txt

Closure: bind, fromCallable, getCurrent
DOMXPath: quote
DateInterval: createFromDateString, __set_state
DatePeriod: createFromISO8601String, __set_state
DateTime: __set_state, createFromImmutable, createFromInterface, createFromFormat, createFromTimestamp, getLastErrors
DateTimeImmutable: __set_state, createFromFormat, createFromTimestamp, getLastErrors, createFromMutable, createFromInterface
DateTimeZone: listAbbreviations, listIdentifiers, __set_state
Dom\AdjacentPosition: cases, from, tryFrom
Dom\HTMLDocument: createEmpty, createFromFile, createFromString
Dom\XMLDocument: createEmpty, createFromFile, createFromString
Dom\XPath: quote
Fiber: getCurrent, suspend
PDO: connect, getAvailableDrivers
Phar: apiVersion, canCompress, canWrite, createDefaultStub, getSupportedCompression, getSupportedSignatures, interceptFileFuncs, isValidPharFilename, loadPhar, mapPhar, running, mount, mungServer, unlinkArchive, webPhar
PharData: apiVersion, canCompress, canWrite, createDefaultStub, getSupportedCompression, getSupportedSignatures, interceptFileFuncs, isValidPharFilename, loadPhar, mapPhar, running, mount, mungServer, unlinkArchive, webPhar
PhpToken: tokenize
PropertyHookType: cases, from, tryFrom
Random\IntervalBoundary: cases
Reflection: getModifierNames
ReflectionMethod: createFromMethodName
ReflectionReference: fromArrayElement
RoundingMode: cases
SQLite3: version, escapeString
SplFixedArray: fromArray
Uri\Rfc3986\Uri: parse
Uri\UriComparisonMode: cases
Uri\WhatWg\Url: parse
Uri\WhatWg\UrlValidationErrorType: cases
WeakReference: create
XMLReader: open, fromUri, fromStream, XML, fromString
XMLWriter: toUri, toMemory, toStream
raw

z-gen.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
 
 
$result = [];
 
foreach (get_declared_classes() as $className) {
    $ref = new ReflectionClass($className);
 
    // Only native (internal) classes
    if (!$ref->isInternal()) {
        continue;
    }
 
    $statics = [];
    foreach ($ref->getMethods(ReflectionMethod::IS_STATIC) as $method) {
        // Only methods declared by this class, not inherited ones
        if ($method->class === $className) {
            $statics[] = $method->getName();
        }
    }
 
    if ($statics) {
        $result[$className] = $statics;
    }
}
 
ksort($result);
 
foreach ($result as $class => $methods) {
    echo $class . ': ' . implode(', ', $methods) . PHP_EOL;
}
Christian Weiske Christian Weiske
owner

History