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/01-default/3rdparty/php-parser/prettyPrinter/expr/docStrings/001.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/docStrings/000.php | tests/fixtures/Formatter/out/01-default/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;
... | 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/01-default/3rdparty/php-parser/prettyPrinter/expr/arrow_function/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/operators/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/shortArraySyntax/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/numbers/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/stringEscaping/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/firstClassCallables/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/closure/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/constant_deref/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/uvs/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/literals/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/namedArgs/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/pipe/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/expr/yield/001.php | tests/fixtures/Formatter/out/01-default/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;
... | 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/01-default/3rdparty/php-parser/prettyPrinter/expr/yield/000.php | tests/fixtures/Formatter/out/01-default/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;
... | 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/01-default/3rdparty/php-parser/prettyPrinter/expr/arrayDestructuring/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/comments/001.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/comments/002.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/comments/000.php | tests/fixtures/Formatter/out/01-default/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... | 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/01-default/3rdparty/php-parser/prettyPrinter/commentsInCommaList/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/indent/001.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/indent/002.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/indent/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/goto/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/disjointNormalFormTypes/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/union_types/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/tryCatch/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/intersection_types/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/throw/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/if/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/do_while/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/switch/000.php | tests/fixtures/Formatter/out/01-default/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';
... | 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/groupUse/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/readonly_class/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/while/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/block/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/multiCatch/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/asymmetric_visibility/000.php | tests/fixtures/Formatter/out/01-default/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/01-default/3rdparty/php-parser/prettyPrinter/stmt/class_const/000.php | tests/fixtures/Formatter/out/01-default/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 |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/properties/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/properties/000.php | <?php
class A
{
public $a;
public string $b;
protected static ?float $c = 5.0;
private static ?self $d;
public readonly int|float $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/01-default/3rdparty/php-parser/prettyPrinter/stmt/namespaces/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/namespaces/001.php | <?php
namespace Foo
{
function foo() {}
}
namespace
{
function glob() {}
}
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/namespaces/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/namespaces/000.php | <?php
namespace Foo;
function foo() {}
namespace Bar;
function 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/tryCatch_without_variable/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/tryCatch_without_variable/000.php | <?php
try {
} catch (Exception) {
} 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/for/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/for/000.php | <?php
for ($i = 0; $i < 10; $i++) {
}
for ($i = 0, $j = 0; $i < 10; $i++) {
}
for ($i = 0; $i < 10;) {
}
for (;;) {
}
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/property_promotion/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/property_promotion/001.php | <?php
class Test
{
public $z;
public function __construct(
public int $x,
/**
* @SomeAnnotation()
*/
public string $y = '123',
string $z = 'abc'
) {}
}
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/property_promotion/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/property_promotion/000.php | <?php
class Point
{
public function __construct(
public float $x = 0.0,
protected array $y = [],
private string $z = 'hello',
public readonly int $a = 0,
protected final bool $b = 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/param_comments/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/param_comments/001.php | <?php
class Test
{
function test(
// Comment
$param
) {}
}
function test(
// Comment
$param
) {}
function (
// Comment
$param
) {};
fn(
// Comment
$param
) => 42;
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/param_comments/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/param_comments/000.php | <?php
class Test
{
function test(
// Comment
$param
) {}
}
function test(
// Comment
$param
) {}
function (
// Comment
$param
) {};
fn(
// Comment
$param
) => 42;
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/enum/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/enum/000.php | <?php
enum A implements B
{
case X;
case Y;
public function foo() {}
}
enum B: int
{
case X = 1;
case Y = 2;
}
enum C: string implements D
{
case Z = 'A';
}
enum D: \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/01-default/3rdparty/php-parser/prettyPrinter/stmt/attributes/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/attributes/001.php | <?php
function test(#[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/01-default/3rdparty/php-parser/prettyPrinter/stmt/attributes/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/attributes/000.php | <?php
#[
A1,
A2(),
A3(0),
A4(x: 1),
]
function a() {}
#[A5]
class C
{
#[A6]
public function m(
#[A7] $param,
) {}
#[A12]
public $prop;
}
#[A8]
interface I {}
#[A9]
trait T {}
$x = #[A10] function () {};
$y = #[A11] fn() => 0;
new
#[A13]
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/01-default/3rdparty/php-parser/prettyPrinter/stmt/alias/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/alias/000.php | <?php
use A\B;
use C\D as E;
use F\G as H, J;
use function foo\bar;
use function foo\bar as baz;
use const foo\BAR;
use const foo\BAR as 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/traitUse/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/traitUse/000.php | <?php
class A
{
use B, C, D {
f as g;
f as private;
f as private g;
B::f as g;
B::f insteadof 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/class/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/class/000.php | <?php
class Foo extends Bar implements ABC, \DEF, namespace\GHI
{
var $a = 'foo';
private $b = 'bar';
static $c = 'baz';
function test()
{
$this->a = 'bar';
echo 'test';
}
protected function baz() {}
public function foo() {}
abstract static function bar() {}
}
tra... | 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/staticType/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/staticType/000.php | <?php
class Test
{
public static function create(): static {}
}
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/declare/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/declare/000.php | <?php
declare(strict_types=1);
declare(ticks=1) {
foo();
}
declare(ticks=2) {
}
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/property_hooks/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/property_hooks/000.php | <?php
class Test
{
public int $prop {
get {
return $this->prop + 1;
}
set {
$this->prop = $value - 1;
}
}
public $prop = 1 {
#[Attr]
&get => $this->prop;
final set($value) => $value - 1;
}
abstract public $prop { get;... | 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/foreach/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/foreach/000.php | <?php
foreach ($arr as $val) {
}
foreach ($arr as &$val) {
}
foreach ($arr as $key => $val) {
}
foreach ($arr as $key => &$val) {
}
| 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/global_static_variables/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/global_static_variables/000.php | <?php
global $a, $$a, ${$a[$a]};
static $a, $b;
static $a = 'foo', $b = '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/01-default/3rdparty/php-parser/prettyPrinter/stmt/const/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/const/000.php | <?php
const FOO = 'BAR';
const FOO = 1 + 1;
const FOO = BAR,
BAR = FOO;
#[Example]
const FOO = true;
#[First]
#[Second]
const FOO = true;
#[First, Second]
const FOO = 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/function_signatures/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/function_signatures/000.php | <?php
interface A
{
function f1();
function f2($a, $b);
function f3(&$a);
function f4(A\B $a);
function f4(array $a);
function f5(callable $a);
function f6(&$a);
function f7(...$a);
function f8(&...$a);
function f9(A &$a);
function f10(A ...$a);
function f11(A &$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/01-default/3rdparty/php-parser/prettyPrinter/stmt/nullable_types/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/nullable_types/000.php | <?php
function test(?Foo $bar, ?string $foo, ?\Xyz $zyx): ?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/01-default/3rdparty/php-parser/prettyPrinter/stmt/voidCast/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/voidCast/000.php | <?php
(void) 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/01-default/3rdparty/php-parser/prettyPrinter/stmt/break_continue/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/prettyPrinter/stmt/break_continue/000.php | <?php
continue;
continue 2;
break;
break 2;
| 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/01-default/3rdparty/php-parser/parser/scalar/explicitOctal/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/explicitOctal/000.php | <?php
0123;
0123;
0123;
01000000000000000000000;
| 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/01-default/3rdparty/php-parser/parser/scalar/magicConst/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/magicConst/000.php | <?php
__CLASS__;
__DIR__;
__FILE__;
__FUNCTION__;
__LINE__;
__METHOD__;
__NAMESPACE__;
__TRAIT__;
__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/01-default/3rdparty/php-parser/parser/scalar/encapsedNegVarOffset/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/encapsedNegVarOffset/000.php | <?php
"$a[-0]";
"$a[-1]";
"$a[-0x0]";
"$a[-00]";
"$a[-9223372036854775808]";
| 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/01-default/3rdparty/php-parser/parser/scalar/docStringNewlines/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/docStringNewlines/000.php | <?php
<<<'EOF'
EOF;
<<<'EOF'
EOF;
<<<'EOF'
Foo
EOF;
<<<EOF
$var
EOF;
<<<'EOF'
EOF;
<<<'EOF'
EOF;
<<<'EOF'
Foo
EOF;
<<<EOF
$var
EOF;
| 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/01-default/3rdparty/php-parser/parser/scalar/encapsedString/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/encapsedString/000.php | <?php
"$A";
"$A->B";
"$A[B]";
"$A[0]";
"$A[1234]";
"$A[9223372036854775808]";
"$A[000]";
"$A[0x0]";
"$A[0b0]";
"$A[$B]";
"{$A}";
"{$A['B']}";
"${A}";
"${A['B']}";
"${$A}";
"\{$A}";
"\{ $A }";
"\\{$A}";
"\{ $A }";
"{$$A}[B]";
"\$$A[B]";
"A $B C";
"$A";
"$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/01-default/3rdparty/php-parser/parser/scalar/int/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/int/000.php | <?php
0;
1;
9223372036854775807;
9.2233720368548e18;
0xFFF;
0xFFF;
0xFFF;
0777;
0b111000111000;
| 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/01-default/3rdparty/php-parser/parser/scalar/unicodeEscape/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/unicodeEscape/001.php | <?php
"\0";
"Ĕ$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/01-default/3rdparty/php-parser/parser/scalar/unicodeEscape/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/unicodeEscape/000.php | <?php
"\0";
"Ĕ$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/01-default/3rdparty/php-parser/parser/scalar/docString/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/docString/000.php | <?php
// empty strings
<<<'EOS'
EOS;
<<<EOS
EOS;
// constant encapsed strings
<<<'EOS'
Test '" $a \n
EOS;
<<<EOS
Test '" \$a \n
EOS;
// encapsed strings
<<<EOS
Test $a
EOS;
<<<EOS
Test $a and $b->c test
EOS;
<<<EOS
Binary
EOS;
<<<EOS
$x\r
EOS;
| 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/01-default/3rdparty/php-parser/parser/scalar/constantString/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/constantString/000.php | <?php
'';
'';
'';
'';
'Hi';
'Hi';
'Hi';
'Hi';
'Hi';
'Hi';
"!'!\!\a!";
"!\"!\!\$!\n!\r!\t!\f!\v!\e!\a";
"!\xff!\xff!\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/01-default/3rdparty/php-parser/parser/scalar/flexibleDocString/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/scalar/flexibleDocString/000.php | <?php
$ary = [
<<<FOO
Test
FOO,
<<<'BAR'
Test
BAR,
];
<<<'END'
END;
<<<END
END;
<<<END
END;
<<<'END'
a
b
c
d
e
END;
<<<END
a
b
$test
d
e
END;
<<<'END'
a
b
c
d
e
END;
<<<END
\ta\r
\ta
b\r
$test
d\r
e
END;
<<<BAR
$one-
BAR;
<<<BAR
$two... | 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/01-default/3rdparty/php-parser/parser/expr/constant_expr/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/constant_expr/000.php | <?php
const T_1 = 1 << 1;
const T_2 = 1 / 2;
const T_3 = 1.5 + 1.5;
const T_4 = 'foo' . 'bar';
const T_5 = (1.5 + 1.5) * 2;
const T_6 = 'foo' . 2 . 3 . 4.0;
const T_7 = __LINE__;
const T_8 = <<<ENDOFSTRING
This is a test string
ENDOFSTRING;
const T_9 = ~-1;
const T_10 = (-1 ?: 1) + (0 ? 2 : 3);
const T_11 = ... | 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/01-default/3rdparty/php-parser/parser/expr/concatPrecedence/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/concatPrecedence/001.php | <?php
1 + 2 . 3 + 4;
1 << 2 . 3 << 4;
| 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/01-default/3rdparty/php-parser/parser/expr/concatPrecedence/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/concatPrecedence/000.php | <?php
1 + 2 . 3 + 4;
1 << 2 . 3 << 4;
| 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/01-default/3rdparty/php-parser/parser/expr/cast/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/cast/000.php | <?php
(array) $a;
(bool) $a;
(bool) $a;
(float) $a;
(float) $a;
(float) $a;
(int) $a;
(int) $a;
(object) $a;
(string) $a;
(unset) $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/01-default/3rdparty/php-parser/parser/expr/new/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/new/000.php | <?php
new A;
new A($b);
// class name variations
new $a();
new $a['b']();
new A::$b();
// DNCR object access
new $a->b();
new $a->b->c();
new $a->b['c']();
// test regression introduces by new dereferencing syntax
(new 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/01-default/3rdparty/php-parser/parser/expr/match/004.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/match/004.php | <?php
$value = match (1) {
0, 1, => 'Foo',
default, => '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/01-default/3rdparty/php-parser/parser/expr/match/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/match/001.php | <?php
$value = match (1) {
// list of conditions
0, 1 => '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/01-default/3rdparty/php-parser/parser/expr/match/002.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/match/002.php | <?php
$result = match ($operator) {
BinaryOperator::ADD => $lhs + $rhs,
};
| 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/01-default/3rdparty/php-parser/parser/expr/match/003.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/match/003.php | <?php
$value = match ($char) {
1 => '1',
default => 'default'
};
| 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/01-default/3rdparty/php-parser/parser/expr/match/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/match/000.php | <?php
echo match (1) {
0 => 'Foo',
1 => '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/01-default/3rdparty/php-parser/parser/expr/throw/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/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/01-default/3rdparty/php-parser/parser/expr/exit/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/exit/000.php | <?php
exit;
exit();
exit('Die!');
die;
die();
die('Exit!');
exit(status: 42);
exit(...$args);
exit($a, $b);
\exit($a);
exit(...);
DIE($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/01-default/3rdparty/php-parser/parser/expr/includeAndEval/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/includeAndEval/000.php | <?php
include 'A.php';
include_once 'A.php';
require 'A.php';
require_once 'A.php';
eval('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/01-default/3rdparty/php-parser/parser/expr/alternative_array_syntax/001.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/alternative_array_syntax/001.php | <?php
$a{'b'};
$a{'b'}();
$a->b{'c'};
$a->b(){'c'};
A::$b{'c'};
A{0};
A::B{0};
new $array{'className'};
new $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/01-default/3rdparty/php-parser/parser/expr/alternative_array_syntax/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/alternative_array_syntax/000.php | <?php
$a{'b'};
$a{'b'}();
$a->b{'c'};
$a->b(){'c'};
A::$b{'c'};
A{0};
A::B{0};
new $array{'className'};
new $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/01-default/3rdparty/php-parser/parser/expr/comparison/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/comparison/000.php | <?php
$a < $b;
$a <= $b;
$a > $b;
$a >= $b;
$a == $b;
$a === $b;
$a != $b;
$a !== $b;
$a <=> $b;
$a instanceof B;
$a instanceof $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/01-default/3rdparty/php-parser/parser/expr/math/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/math/000.php | <?php
// unary ops
~$a;
+$a;
-$a;
// binary ops
$a & $b;
$a | $b;
$a ^ $b;
$a . $b;
$a / $b;
$a - $b;
$a % $b;
$a * $b;
$a + $b;
$a << $b;
$a >> $b;
$a ** $b;
// associativity
$a * $b * $c;
$a * ($b * $c);
// precedence
$a + $b * $c;
($a + $b) * $c;
// pow is special
$a ** $b ** $c;
($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/01-default/3rdparty/php-parser/parser/expr/arraySpread/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/arraySpread/000.php | <?php
$array = [1, 2, 3];
function getArr()
{
return [4, 5];
}
function arrGen()
{
for ($i = 11; $i < 15; $i++) {
yield $i;
}
}
[...[]];
[...[1, 2, 3]];
[...$array];
[...getArr()];
[...arrGen()];
[...new ArrayIterator(['a', 'b', 'c'])];
[0, ...$array, ...getArr(), 6, 7, 8, 9, 10, ...arrGen()];
[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/01-default/3rdparty/php-parser/parser/expr/closure_use_trailing_comma/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/closure_use_trailing_comma/000.php | <?php
function () use (
$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/01-default/3rdparty/php-parser/parser/expr/print/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/print/000.php | <?php
print $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/01-default/3rdparty/php-parser/parser/expr/arrayEmptyElemens/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/arrayEmptyElemens/000.php | <?php
[1,, 2];
array(1,, 2);
| 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/01-default/3rdparty/php-parser/parser/expr/nullsafe/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/nullsafe/000.php | <?php
$a?->b;
$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/01-default/3rdparty/php-parser/parser/expr/errorSuppress/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/errorSuppress/000.php | <?php
@$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/01-default/3rdparty/php-parser/parser/expr/arrow_function/000.php | tests/fixtures/Formatter/out/01-default/3rdparty/php-parser/parser/expr/arrow_function/000.php | <?php
fn(bool $a) => $a;
fn($x = 42) => $x;
static fn(&$x) => $x;
fn&($x) => $x;
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.