repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04102-4.10-interface-and-abstract-properties.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04102-4.10-interface-and-abstract-properties.php | <?php
abstract class Example
{
abstract public string $name {
get => ucfirst($this->name);
set;
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05302-5.3-while-do-while.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05302-5.3-while-do-while.php | <?php
do {
// ...
} while ($expr);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04902-4.9-property-hooks.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04902-4.9-property-hooks.php | <?php
class Example
{
public string $myName {
get => __CLASS__;
}
public string $newName {
set => ucfirst($value);
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/09000-9-enumerations.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/09000-9-enumerations.php | <?php
enum Suit: string
{
case Hearts = 'H';
case Diamonds = 'D';
case Spades = 'S';
case Clubs = 'C';
public const Wild = self::Spades;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05201-5.2-switch-case-match.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05201-5.2-switch-case-match.php | <?php
switch (
$expr1 &&
$expr2
) {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03003-3-declare-statements-namespace-and-import-statements.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03003-3-declare-statements-namespace-and-import-statements.php | <?php declare(strict_types=1) ?>
<html>
<body>
<?php
// ...
?>
</body>
</html>
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04702-4.7-method-and-function-calls.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04702-4.7-method-and-function-calls.php | <?php
somefunction($foo, $bar, [
// ...
], $baz);
$app->get('/hello/{name}', function ($name) use ($app) {
return 'Hello ' . $app->escape($name);
});
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/07000-7-closures.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/07000-7-closures.php | <?php
$closureWithArgs = function ($arg1, $arg2) {
// ...
};
$closureWithArgsAndVars = function ($arg1, $arg2) use ($var1, $var2) {
// ...
};
$closureWithArgsVarsAndReturn = function ($arg1, $arg2) use ($var1, $var2): bool {
// ...
};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05301-5.3-while-do-while.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05301-5.3-while-do-while.php | <?php
while (
$expr1 &&
$expr2
) {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/11001-11-arrays.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/11001-11-arrays.php | <?php
$arr1 = ['single', 'line', 'declaration'];
$arr2 = [
'multi',
'line',
'declaration',
['values' => 1, 5, 7],
[
'nested',
'array',
],
];
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/07100-7.1-short-closures.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/07100-7.1-short-closures.php | <?php
$func = fn(int $x, int $y): int => $x + $y;
$func = fn(int $x, int $y): int =>
$x + $y;
$func = fn(
int $x,
int $y,
): int =>
$x + $y;
$result = $collection->reduce(fn(int $x, int $y): int => $x + $y, 0);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04500-4.5-method-and-function-parameters.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04500-4.5-method-and-function-parameters.php | <?php
namespace Vendor\Package;
class ClassName
{
public function foo(int $arg1, &$arg2, $arg3 = [])
{
// ...
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05300-5.3-while-do-while.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05300-5.3-while-do-while.php | <?php
while ($expr) {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04002-4-classes-properties-and-methods.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04002-4-classes-properties-and-methods.php | <?php
new Foo()->someMethod();
new Foo()::someStaticMethod();
new Foo()->someProperty;
new Foo()::$someStaticProperty;
new Foo()::SOME_CONSTANT;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04901-4.9-property-hooks.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04901-4.9-property-hooks.php | <?php
class Example
{
public string $myName {
get => __CLASS__;
}
public string $newName {
set => ucfirst($value);
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03002-3-declare-statements-namespace-and-import-statements.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03002-3-declare-statements-namespace-and-import-statements.php | <?php
use Vendor\Package\SomeNamespace\{
// This has too many namespace segments to be in a group
SubnamespaceOne\AnotherNamespace\ClassA,
SubnamespaceOne\ClassB,
ClassZ,
};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04903-4.9-property-hooks.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04903-4.9-property-hooks.php | <?php
class Example
{
public function __construct(
public string $name {
set => ucfirst($value);
}
) {}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04700-4.7-method-and-function-calls.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04700-4.7-method-and-function-calls.php | <?php
bar();
$foo->bar($arg1);
Foo::bar($arg2, $arg3);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05401-5.4-for.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05401-5.4-for.php | <?php
for (
$i = 0;
$i < 10;
$i++
) {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05202-5.2-switch-case-match.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05202-5.2-switch-case-match.php | <?php
$returnValue = match ($expr) {
0 => 'First case',
1, 2, 3 => multipleCases(),
default => 'Default case',
};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/10002-10-heredoc-and-nowdoc.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/10002-10-heredoc-and-nowdoc.php | <?php
function allowed()
{
$allowedHeredoc = <<<COMPLIANT
This
is
a
compliant
heredoc
COMPLIANT;
$allowedNowdoc = <<<'COMPLIANT'
This
is
a
compliant
nowdoc
COMPLIANT;
var_dump(
'foo',
<<<'COMPLIANT'
This
is
a
compliant
parameter
COMPLIANT,
'bar',
);
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/12400-12.4-example.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/12400-12.4-example.php | <?php
#[Foo]
#[Bar('baz')]
class Demo
{
#[Beep]
private Foo $foo;
public function __construct(
#[Load(context: 'foo', bar: true)]
private readonly FooService $fooService,
#[LoadProxy(context: 'bar')]
private readonly BarService $barService,
) {}
/**
* Sets the foo.
*/
#[Poink('narf'), Narf('poink'... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06200-6.2-binary-operators.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06200-6.2-binary-operators.php | <?php
if ($a === $b) {
$foo = $bar ?? $a ?? $b;
} elseif ($a > $b) {
$foo = $a + $b * $c;
} else {
$foo = $a|> log(...)|> round(...);
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/07001-7-closures.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/07001-7-closures.php | <?php
$longArgs_noVars = function (
$longArgument,
$longerArgument,
$muchLongerArgument,
) {
// ...
};
$noArgs_longVars = function () use (
$longVar1,
$longerVar2,
$muchLongerVar3,
) {
// ...
};
$longArgs_longVars = function (
$longArgument,
$longerArgument,
$muchLongerArgument,
) use (
$longVar1,
$long... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06101-6.1-unary-operators.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06101-6.1-unary-operators.php | <?php
$intValue = (int) $input;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04000-4-classes-properties-and-methods.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04000-4-classes-properties-and-methods.php | <?php
new Foo();
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/02500-2.5-keywords-and-types.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/02500-2.5-keywords-and-types.php | <?php
function foo(int|string $a): User|Product
{
// ...
}
function somethingWithReflection(
\ReflectionObject|\ReflectionClass|\ReflectionMethod|\ReflectionParameter|\ReflectionProperty $reflect
): object|null {
// ...
}
function complex(array|(ArrayAccess&Traversable) $input): ArrayAccess&Traversable
{
// ...
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05600-5.6-try-catch-finally.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05600-5.6-try-catch-finally.php | <?php
try {
// ...
} catch (FirstThrowableType $e) {
// ...
} catch (OtherThrowableType|AnotherThrowableType $e) {
// ...
} finally {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05101-5.1-if-elseif-else.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05101-5.1-if-elseif-else.php | <?php
if (
$expr1 &&
$expr2
) {
// ...
} elseif (
$expr3 &&
$expr4
) {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04202-4.2-using-traits.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04202-4.2-using-traits.php | <?php
namespace Vendor\Package;
use Vendor\Package\FirstTrait;
class ClassName
{
use FirstTrait;
private $property;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04201-4.2-using-traits.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04201-4.2-using-traits.php | <?php
namespace Vendor\Package;
use Vendor\Package\FirstTrait;
class ClassName
{
use FirstTrait;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04003-4-classes-properties-and-methods.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04003-4-classes-properties-and-methods.php | <?php
(new Foo())->someMethod();
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03004-3-declare-statements-namespace-and-import-statements.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03004-3-declare-statements-namespace-and-import-statements.php | <?php
declare(ticks=1) {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/11000-11-arrays.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/11000-11-arrays.php | <?php
$arr = [];
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05100-5.1-if-elseif-else.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05100-5.1-if-elseif-else.php | <?php
if ($expr1) {
// ...
} elseif ($expr2) {
// ...
} else {
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04703-4.7-method-and-function-calls.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04703-4.7-method-and-function-calls.php | <?php
somefunction($a, b: $b, c: 'c');
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04502-4.5-method-and-function-parameters.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04502-4.5-method-and-function-parameters.php | <?php declare(strict_types=1);
namespace Vendor\Package;
class ReturnTypeVariations
{
public function functionName(int $arg1, $arg2): string
{
return 'foo';
}
public function anotherFunction(
string $foo,
string $bar,
int $baz,
): string {
return 'foo';
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04402-4.4-methods-and-functions.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04402-4.4-methods-and-functions.php | <?php
class Point
{
public function __construct(
private int $x,
private int $y
) {}
// ...
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04503-4.5-method-and-function-parameters.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04503-4.5-method-and-function-parameters.php | <?php declare(strict_types=1);
namespace Vendor\Package;
class ReturnTypeVariations
{
public function functionName(?string $arg1, ?int &$arg2): ?string
{
return 'foo';
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04705-4.7-method-and-function-calls.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04705-4.7-method-and-function-calls.php | <?php
exit();
exit(1);
exit('Success!');
die();
$result = foo() ?? exit();
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04403-4.4-methods-and-functions.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04403-4.4-methods-and-functions.php | <?php
class Point
{
public function __construct(
public readonly int $x,
public readonly int $y,
) {}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04300-4.3-properties-and-constants.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04300-4.3-properties-and-constants.php | <?php
namespace Vendor\Package;
class ClassName
{
public $foo = null;
public static int $bar = 0;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06301-6.3-ternary-operators.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06301-6.3-ternary-operators.php | <?php
$variable = $foo ?: 'bar';
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06100-6.1-unary-operators.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06100-6.1-unary-operators.php | <?php
$i++;
++$j;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/nestedInlineHTML/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/nestedInlineHTML/000.php | <?php
function test()
{
?>
Test
<?php
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/cast/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/cast/000.php | <?php
$int = (int) $int;
$integer = (int) $integer;
$bool = (bool) $bool;
$boolean = (bool) $boolean;
$string = (string) $string;
$binary = (string) $binary;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/match/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/match/000.php | <?php
echo match (1) {
0, 1 => 'Foo',
// Comment
2 => 'Bar',
default => 'Foo',
};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/throw/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/throw/000.php | <?php
test(throw $x);
$a ?? throw new Exception;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/anonymousClass/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/anonymousClass/000.php | <?php
new class {};
new class extends A implements B, C {};
new class($a) extends A {
private $a;
public function __construct($a)
{
$this->a = $a;
}
};
new readonly class {};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/newVariable/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/newVariable/000.php | <?php
new ('a' . 'b');
new (x);
new (foo());
new ('foo');
new (x[0]);
new (x->y);
new ((x)::$y);
$x instanceof ('a' . 'b');
$x instanceof ($y++);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/list/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/list/000.php | <?php
list() = $a;
list($a) = $b;
list($a, $b, $c) = $d;
list(, $a) = $b;
list(,, $a,, $b) = $c;
list(list($a)) = $b;
list(, list(, list(, $a), $b)) = $c;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/variables/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/variables/000.php | <?php
$a;
$$a;
${$a};
$a->b;
$a->b();
$a->b($c);
$a->$b();
$a->{$b}();
$a->$b[$c]();
$$a->b;
$a[$b];
$a[$b]();
$$a[$b];
$a::B;
$a::$b;
$a::b();
$a::b($c);
$a::$b();
$a::$b[$c];
$a::$b[$c]($d);
$a::{$b[$c]}($d);
$a::{$b->c}();
A::$$b[$c]();
a();
$a();
$a()[$b];
$a->b()[$c];
$a::$b()[$c];
(new A)->b;
(new A())->b();
(ne... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/parentheses/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/parentheses/000.php | <?php
echo 'abc' . 'cde' . 'fgh';
echo 'abc' . ('cde' . 'fgh');
echo ('abc' . 1) + 2 . 'fgh';
echo 'abc' . (1 + 2) . 'fgh';
echo 1 * 2 + 3 / 4 % 5 . 6;
echo 1 * (2 + 3) / (4 % (5 . 6));
$a = $b = $c = $d = $f && true;
($a = $b = $c = $d = $f) && true;
$a = $b = $c = $d = $f and true;
$a = $b = $c = $d = ($f and tru... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/arraySpread/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/arraySpread/000.php | <?php
[$a, $b] = [...$c, ...$d];
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/newDerefParentheses/001.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/newDerefParentheses/001.php | <?php
new MyClass()::CONSTANT;
new MyClass()::$staticProperty;
new MyClass()::staticMethod();
new MyClass()->property;
new MyClass()->method();
new MyClass()();
new MyClass()[0];
new class {}::CONSTANT;
new class {}::$staticProperty;
new class {}::staticMethod();
new class {}->property;
new class {}->method();
new clas... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/newDerefParentheses/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/newDerefParentheses/000.php | <?php
new MyClass()::CONSTANT;
new MyClass()::$staticProperty;
new MyClass()::staticMethod();
new MyClass()->property;
new MyClass()->method();
new MyClass()();
new MyClass()[0];
new class {}::CONSTANT;
new class {}::$staticProperty;
new class {}::staticMethod();
new class {}->property;
new class {}->method();
new clas... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/include/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/include/000.php | <?php
(include $foo) && (include $bar);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/intrinsics/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/intrinsics/000.php | <?php
isset($a, $a[$b]);
empty($a);
empty('foo');
unset($a, $a[$b]);
exit;
exit();
exit(1);
die;
die();
die('foo');
clone $foo;
eval('str');
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/nullsafe/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/nullsafe/000.php | <?php
$a?->b;
$a?->b($c);
$a?->b?->c;
$a?->b($c)?->d;
$a?->b($c)();
new $a?->b;
"{$a?->b}";
"$a?->b";
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/dynamicClassConstFetch/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/dynamicClassConstFetch/000.php | <?php
Foo::{bar()};
$foo::{bar()};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/docStrings/001.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/docStrings/001.php | <?php
if (1) {
foo(<<<STR
abc
STR,
<<<STR
abc
STR);
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/docStrings/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/docStrings/000.php | <?php
<<<'STR'
STR;
<<<STR
STR;
<<<'STR'
A
B
STR;
<<<STR
A
B
STR;
<<<'STR'
a\nb$c
STR;
<<<STR
a\\nb\$c
STR;
<<<STR
a$b
{$c->d}
STR;
call(
<<<STR
A
STR,
<<<STR
B
STR
);
function test()
{
<<<'STR'
STR;
<<<'STR'
Foo
Bar
Baz
STR;
<<<STR
STR;
<<<STR
Foo
Bar
STR;
<<<STR
Bar
Baz
ST... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/arrow_function/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/arrow_function/000.php | <?php
fn($a) => $a;
fn($x = 42) => $x;
fn(&$x) => $x;
fn&($x) => $x;
static fn($x, ...$rest) => $rest;
fn(): int => $x;
fn($a, $b) => $a and $b;
fn($a, $b) => $a && $b;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/operators/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/operators/000.php | <?php
$a ** $b;
++$a;
--$a;
$a++;
$a--;
@$a;
~$a;
-$a;
+$a;
(int) $a;
(int) $a;
(float) $a;
(float) $a;
(float) $a;
(float) $a;
(float) $a;
(float) $a;
(string) $a;
(string) $a;
(array) $a;
(object) $a;
(bool) $a;
(bool) $a;
(unset) $a;
$a * $b;
$a / $b;
$a % $b;
$a + $b;
$a - $b;
$a . $b;
$a << $b;
$a >> $b;
$a <... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/shortArraySyntax/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/shortArraySyntax/000.php | <?php
[];
array(1, 2, 3);
['a' => 'b', 'c' => 'd'];
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/numbers/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/numbers/000.php | <?php
0;
+0;
-0;
0.0;
-0.0;
42;
-42;
42.0;
-42.0;
42.5;
-42.5;
1.0e42;
-1.0e42;
1.0e1000;
-1.0e1000;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/stringEscaping/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/stringEscaping/000.php | <?php
"\n\r\t\f\v\$\"\\";
"\0\x01\x02\x03\x04\x05\x06\x07\x08\t
\v\f
\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\e\x1c\x1d\x1e\x1f";
"\x000\x001";
'äöü';
"\xc0\x80";
"\xd0\x01";
"\xf0\x80\x80";
<<<DOC
\r\t\f\v\$\"\
\0\x01\x02\x03\x04\x05\x06\x07\x08\t
\v\f
\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/firstClassCallables/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/firstClassCallables/000.php | <?php
foo(...);
$this->foo(...);
A::foo(...);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/closure/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/closure/000.php | <?php
$closureWithArgs = function (
$arg1,
$arg2
) {
$comment = 'closure body';
};
$closureWithArgsAndVars = function ($arg1, $arg2) use ($var1, $var2) {
$comment = 'closure body';
};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/constant_deref/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/constant_deref/000.php | <?php
FOO[0];
FOO::BAR[0];
'FOO'[0];
array(FOO)[0];
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/uvs/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/uvs/000.php | <?php
(function () {})();
array('a', 'b')()();
A::$b::$c;
$A::$b[$c]();
$A::{$b[$c]}();
A::$$b[$c]();
($a->b)();
(A::$b)();
('a' . 'b')::X;
(A)::X;
(A)::$x;
(A)::x();
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/literals/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/literals/000.php | <?php
// magic constants
__LINE__;
__FILE__;
__DIR__;
__FUNCTION__;
__CLASS__;
__TRAIT__;
__METHOD__;
__NAMESPACE__;
__PROPERTY__;
// not actually literals, but close
null;
true;
false;
NULL;
TRUE;
FALSE;
// integers (normalized to decimal)
0;
11;
011;
0x11;
0b11;
// floats (normalized to ... something)
0.0;
0.0;
0... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/namedArgs/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/namedArgs/000.php | <?php
foo(a: $b, c: $d);
bar(class: 0);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/pipe/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/pipe/000.php | <?php
$a|> $b|> $c;
$a . $b|> $c . $d;
$a|> $b == $c;
$c == $a|> $b;
($a == $b)|>($c == $d);
$a . ($b|> $c) . $d;
$a|>(fn($x) => $x)|>(fn($y) => $y)|> $b;
(fn($x) => $x)|> $y;
fn($x) => $x|> $y;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/yield/001.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/yield/001.php | <?php
function gen()
{
yield;
yield $a;
yield $a => $b;
$a = yield;
$a = yield $b;
$a = yield $b => $c;
yield from $a;
$a = yield from $b;
(yield $a) + $b;
(yield from $a) + $b;
[yield $a => $b];
[(yield $a) => $b];
[$a + (yield $b) => $c];
yield yield $a => $b;
yield (yield $a) => $b;
match ($x) {
y... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/yield/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/yield/000.php | <?php
function gen()
{
yield;
yield $a;
yield $a => $b;
$a = yield;
$a = yield $b;
$a = yield $b => $c;
yield from $a;
$a = yield from $b;
(yield $a) + $b;
(yield from $a) + $b;
[yield $a => $b];
[(yield $a) => $b];
[$a + (yield $b) => $c];
yield yield $a => $b;
yield (yield $a) => $b;
match ($x) {
y... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/arrayDestructuring/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/expr/arrayDestructuring/000.php | <?php
[$a, $b] = [$c, $d];
[
,
$a,,,
$b,,
] = $foo;
[, [[$a]], $b] = $bar;
['a' => $b, 'b' => $a] = $baz;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/comments/001.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/comments/001.php | <?php
function test()
{
// empty
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/comments/002.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/comments/002.php | <?php
function noDuplicateComment()
{
if (true):
// TEST 1
elseif (true):
// TEST 2
else:
// TEST 3
endif;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/comments/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/comments/000.php | <?php
function justForIndentation()
{
// Some text
// Some text
/* Some text */
/** Some text */
/**
* Some text.
* Some more text.
*/
/*
* Some text.
* Some more text.
*/
/*
* Some text.
* Some more text.
*/
/* Some text.
More text. */
/* Some text.
More text.
Even more text.... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/commentsInCommaList/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/commentsInCommaList/000.php | <?php
$arr = [
// Foo
$foo,
// Bar
$bar,
// Discarded
];
[
// Foo
$foo,,
// Bar
$bar,
] = $arr;
foo(
// Foo
$foo,
// Bar
$bar
);
new Foo(
// Foo
$foo
);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/indent/001.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/indent/001.php | <?php
class Test
{
/**
* Comment
*/
public function foo()
{
if (1) {
echo $bar;
}
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/indent/002.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/indent/002.php | <?php
class Test
{
/**
* Comment
*/
public function foo()
{
if (1) {
echo $bar;
}
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/indent/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/indent/000.php | <?php
class Test
{
/**
* Comment
*/
public function foo()
{
if (1) {
echo $bar;
}
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/goto/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/goto/000.php | <?php
marker:
goto marker;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/disjointNormalFormTypes/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/disjointNormalFormTypes/000.php | <?php
class Test
{
public (A&B)|(X&Y) $prop;
}
function test((A&B)|(X&Y) $a): (A&B)|(X&Y) {}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/union_types/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/union_types/000.php | <?php
class Test
{
public A|iterable|null $prop;
}
function test(A|B $a): int|false {}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/tryCatch/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/tryCatch/000.php | <?php
try {
} catch (Exception $e) {
}
try {
} catch (Exception $e) {
} finally {
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/intersection_types/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/intersection_types/000.php | <?php
class Test
{
public A&B $prop;
}
function test(A&B $a): A&B {}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/throw/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/throw/000.php | <?php
throw $e;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/if/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/if/000.php | <?php
if ($expr) {
} elseif ($expr2) {
} else if ($expr3) {
} else {
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/do_while/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/do_while/000.php | <?php
do {
} while (true);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/switch/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/switch/000.php | <?php
switch ($expr) {
case 0:
echo 'First case, with a break';
break;
case 1:
echo 'Second case, which falls through';
case 2:
case 3:
case 4:
echo 'Third case, return instead of break';
return;
// Comment
default:
echo 'Default case';
break;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/groupUse/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/groupUse/000.php | <?php
use A\B\{C\D, E};
use A\B\{C\D, function b\c, const D};
use A\{B\C, D};
use A\{B};
use function A\{b\c, d};
use const A\{B\C, D};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/readonly_class/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/readonly_class/000.php | <?php
readonly class Foo {}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/while/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/while/000.php | <?php
while (true) {
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/block/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/block/000.php | <?php
echo 'a';
{
}
{
echo 'b';
}
if ($c) {
echo 'c';
{
echo 'd';
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/multiCatch/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/multiCatch/000.php | <?php
try {
$x;
} catch (X|Y $e1) {
$y;
} catch (\A|B\C $e2) {
$z;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/asymmetric_visibility/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/asymmetric_visibility/000.php | <?php
class Test
{
final protected private(set) $a;
private public(set) static $b;
protected(set) $c;
public function __construct(
protected private(set) $d,
private public(set) $e,
protected(set) $f,
) {}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/class_const/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-parser/prettyPrinter/stmt/class_const/000.php | <?php
class Foo
{
const A = 1,
B = 2;
public const C = 3,
D = 4;
protected const E = 5,
F = 6;
private const int G = 7,
H = 8;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.