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 FoobarWithReflectionCall | |
{ | |
public static function staticMethod(int|float $value): int|float | |
{ | |
return $value; | |
} | |
public static function __callStatic(string $name, array $arguments): int|float|null |
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 | |
/** | |
* @implements ArrayAccess<BackedEnum|array-key, mixed> | |
*/ | |
class Foobar implements ArrayAccess | |
{ | |
/** | |
* @param array<array-key, mixed> $members | |
*/ |
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
┌────────────────┬───┬───┬───┬───┬────┬────┬─────┬─────┬──────┐ | |
│ Team │ P │ W │ D │ L │ F │ A │ GD │ Pts │ Rank │ | |
├────────────────┼───┼───┼───┼───┼────┼────┼─────┼─────┼──────┤ | |
│ Man City │ 6 │ 6 │ 0 │ 0 │ 16 │ 3 │ 13 │ 18 │ 1 │ | |
│ Liverpool │ 6 │ 5 │ 1 │ 0 │ 15 │ 5 │ 10 │ 16 │ 2 │ | |
│ Brighton │ 6 │ 5 │ 0 │ 1 │ 18 │ 8 │ 10 │ 15 │ 3 │ | |
│ Tottenham │ 6 │ 4 │ 2 │ 0 │ 15 │ 7 │ 8 │ 14 │ 4 │ | |
│ Arsenal │ 6 │ 4 │ 2 │ 0 │ 11 │ 6 │ 5 │ 14 │ 5 │ | |
│ Aston Villa │ 6 │ 4 │ 0 │ 2 │ 12 │ 10 │ 2 │ 12 │ 6 │ | |
│ West Ham │ 6 │ 3 │ 1 │ 2 │ 11 │ 10 │ 1 │ 10 │ 7 │ |
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 | |
declare(strict_types=1); | |
namespace League\Uri; | |
use Closure; | |
use Countable; | |
use Iterator; | |
use IteratorAggregate; |
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 | |
use League\Uri\Idna\Converter as IdnConverter; | |
use League\Uri\IPv4\Converter as Ipv4Converter; | |
echo IdnConverter::toAscii('bébé.be')->domain(), PHP_EOL; //display "xn--bb-bjab.be" | |
echo Ipv4Converter::fromEnvironment()->toDecimal('192.87.125'); //display "192.87.0.125" |
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 | |
/** | |
* @template T | |
*/ | |
class Maybe | |
{ | |
/** | |
* @param T|null $value | |
*/ |
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 | |
declare(strict_types=1); | |
require 'autoload.php'; | |
use League\Period\DatePoint; | |
use League\Period\Period; | |
/** |
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 | |
declare(strict_types=1); | |
use League\Uri\UriTemplate; | |
use League\Uri\Components\Query; | |
require 'vendor/autoload.php'; | |
$template = 'https://api.twitter.com/{version}/{?q*}'; |
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 | |
function getReport(CarbonInterface $start, CarbonInterface $end): Report | |
{ | |
return Report::query() | |
->whereDate('status_date', '>=', $start) | |
->whereDate('status_date', '<', $end) | |
} |
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 | |
declare(strict_types=1); | |
use League\BooBoo; | |
use League\CLImate; | |
use League\Csv; | |
use League\Container; | |
use League\Flysystem; | |
use League\HTMLToMarkdown; |
NewerOlder