Skip to content

Instantly share code, notes, and snippets.

View exakat's full-sized avatar

Exakat exakat

View GitHub Profile
//audited on https://github.com/FriendsOfPHP/Goutte
//The child constructor (a), then the parent constructor (c)
0)
a => 'public function __construct(HttpClientInterface $client = null, History $history = null, CookieJar $cookieJar = null) { /**/ } '
c => 'public function __construct(array $server = [ ], History $history = null, CookieJar $cookieJar = null) { /**/ } '
1)
a => 'public function __construct(Headers $headers = null, AbstractPart $body = null) { /**/ } '
c => 'public function __construct(Headers $headers = null, AbstractPart $body = null) { /**/ } '
2)
a => 'public function __construct($body, string $filename = null, string $contentType = null, string $encoding = null) { /**/ } '
@exakat
exakat / gist:9d6d1cc04639a43e62bed85d133d87ef
Last active June 1, 2023 04:51
List of ++ used on strings
acym $iLength-- /front/libraries/sabberworm/php-css-parser/src/Parsing/ParserState.php:455
acymailing6 $iLength-- /front/libraries/sabberworm/php-css-parser/src/Parsing/ParserState.php:455
amphp_amp $id++ /vendor/revolt/event-loop/test/Driver/TimerQueueTest.php:50
amphp_amp $id++ /vendor/revolt/event-loop/test/Driver/TimerQueueTest.php:50
amphp_amp $this->nextId++ /vendor/amphp/amp/src/CompositeCancellation.php:72
amphp_amp $this->nextId++ /vendor/amphp/amp/src/Internal/Cancellable.php:61
amphp_amp $this->nextId++ /vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:131
amphp_amp $this->nextId++ /vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:145
amphp_amp $this->nextId++ /vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:159
amphp_amp $this->nextId++ /vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:169
@exakat
exakat / gist:f5f5c7fbd114a8a9073ed8a7cb4f19fc
Created August 4, 2022 20:24
List of PHP magic methods, paired in the same class (standalone classes, no inheritence used), over 2500 OSS projects.
{
"__clone,__get,__isset": 1,
"__call,__callstatic,__clone,__serialize,__unserialize": 1,
"__clone,__get,__isset,__serialize,__set,__unserialize": 1,
"__callstatic,__clone,__get,__isset,__set": 1,
"__call,__clone,__get,__isset,__set": 1,
"__call,__callstatic,__get,__isset,__set,__set_state": 1,
"__clone,__get,__set,__wakeup": 1,
"__clone,__invoke": 1,
"__get,__isset,__set,__set_state,__unset": 1,
phpkb
0 => sys['PHP_INI'] 1205
1 => loader['osnamequal'] 1637
2 => loader['osname'] 1637
3 => loader['wordsize'] 1637
4 => loader['osname'] 1649
5 => sysinfo['PHP_INI'] 1894
6 => sysinfo['PHP_INI_DIR'] 1899
7 => sysinfo['SS'] 1929
8 => sysinfo['PHP_COMPILER'] 2503
<?php
class 人 {
public function getName() {
print "孙悟空";
}
}
$x = new 人();
echo $x->getName();