Skip to content

Instantly share code, notes, and snippets.

View dseguy's full-sized avatar
💭
Working on Exakat

Seguy Damien dseguy

💭
Working on Exakat
View GitHub Profile
@dseguy
dseguy / gist:8ceb734a37f51cc9dc1bb7f2a7530ddb
Created October 5, 2022 08:16
PHP attributes from Open Sources projects (2022-10)
[RouteHandler] => 1
[OA\Parameter] => 1
[OA\OpenApi] => 1
[OA\SecurityScheme] => 1
[Auditable] => 1
[AppAssert\StorageLocation] => 1
[AppAssert\UniqueEntity] => 1
[AppAssert\StationPortChecker] => 1
[DefaultSchemeHost] => 1
[Headers] => 1
@dseguy
dseguy / gist:a901d29d10427324fe3618f7920cb87c
Last active February 7, 2022 16:01
List of Packagist components that extends or implements a composer-plugin class.
{
"counts": {
"\\Composer\\Command\\DiagnoseCommand": 1,
"\\Composer\\Command\\ExecCommand": 1,
"\\Composer\\Repository\\InstalledFilesystemRepository": 1,
"\\Composer\\Repository\\FilesystemRepository": 1,
"\\Composer\\Util\\Git": 1,
"\\Composer\\Installer\\InstallerEvent": 1,
"\\Composer\\Command\\InstallCommand": 1,
"\\Composer\\Repository\\RepositoryManager": 1,
<?php
shell_exec('rm -rf folder');
unlink('iterator.phar');
unlink('addfile.phar');
mkdir('folder', 0755);
mkdir('folder/sub', 0755);
file_put_contents('folder/sub/a.txt', 'a');
file_put_contents('folder/sub/b.txt', 'b');
<?php
trait t {
public static $c = 1;
static function foo() {
echo ++t::$c;
// This leaves the property in the local structure
//echo ++self::$c;
}
<?php
class x extends y {
function y (parent $y) {
var_dump($y);
}
}
class y {}