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-doc/language/functions/020.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/020.php
<?php array_fill(value: 50, count: 100, start_index: 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-doc/language/functions/043.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/043.php
<?php class Foo { public function method() {} public static function staticmethod() {} public function __invoke() {} } $obj = new Foo(); $classStr = 'Foo'; $methodStr = 'method'; $staticmethodStr = 'staticmethod'; $f1 = strlen(...); $f2 = $obj(...); // invokable object $f3 = $obj->method(...); $f4 = $obj->$metho...
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-doc/language/functions/029.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/029.php
<?php class Foo { static $variable = 'static property'; static function Variable() { echo 'Method Variable called'; } } echo Foo::$variable; // This prints 'static property'. It does need a $variable in this scope. $variable = 'Variable'; Foo::$variable(); // This calls $foo->Variable() reading $variable in t...
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-doc/language/functions/012.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/012.php
<?php function makeyogurt($flavour, $container = 'bowl') { return "Making a $container of $flavour yogurt.\n"; } echo makeyogurt('raspberry'); // "raspberry" is $flavour ?>
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-doc/language/functions/019.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/019.php
<?php // Using positional arguments: array_fill(0, 100, 50); // Using named arguments: array_fill(start_index: 0, count: 100, value: 50); ?>
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-doc/language/functions/014.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/014.php
<?php function foo($a = [], $b) {} // Default not used; deprecated as of PHP 8.0.0 function foo($a, $b) {} // Functionally equivalent, no deprecation notice function bar(A $a = null, $b) {} // As of PHP 8.1.0, $a is implicitly required // (because it comes before the required one), // but implicitly nullable (depre...
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-doc/language/functions/041.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/041.php
<?php fn(array $x) => $x; static fn($x): int => $x; fn($x = 42) => $x; fn(&$x) => $x; fn&($x) => $x; fn($x, ...$rest) => $rest; ?>
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-doc/language/functions/044.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/044.php
<?php class Foo { public function getPrivateMethod() { return [$this, 'privateMethod']; } private function privateMethod() { echo __METHOD__, "\n"; } } $foo = new Foo; $privateMethod = $foo->getPrivateMethod(); $privateMethod(); // Fatal error: Call to private method Foo::privateMethod() from global scope ...
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-doc/language/functions/037.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/037.php
<?php class Foo { function __construct() { $func = static function () { var_dump($this); }; $func(); } }; 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-doc/language/functions/015.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/015.php
<?php function sum(...$numbers) { $acc = 0; foreach ($numbers as $n) { $acc += $n; } return $acc; } echo sum(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/03-tab/3rdparty/php-doc/language/functions/007.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/007.php
<?php function add_some_extra(&$string) { $string .= 'and something extra.'; } $str = 'This is a string, '; add_some_extra($str); echo $str; // outputs 'This is a string, and something extra.' ?>
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-doc/language/functions/010.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/010.php
<?php class DefaultCoffeeMaker { public function brew() { return "Making coffee.\n"; } } class FancyCoffeeMaker { public function brew() { return "Crafting a beautiful coffee just for you.\n"; } } function makecoffee($coffeeMaker = new DefaultCoffeeMaker) { return $coffeeMaker->brew(); } echo makecoffee()...
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-doc/language/functions/003.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/003.php
<?php function foo() { function bar() { echo "I don't exist until foo() is called.\n"; } } /* We can't call bar() yet since it doesn't exist. */ foo(); /* Now we can call bar(), foo()'s processing has made it accessible. */ 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-doc/language/functions/023.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/023.php
<?php function foo($a, $b, $c = 3, $d = 4) { return $a + $b + $c + $d; } var_dump(foo(...[1, 2], d: 40)); // 46 var_dump(foo(...['b' => 2, 'a' => 1], d: 40)); // 46 var_dump(foo(...[1, 2], b: 20)); // Fatal error. Named parameter $b overwrites previous argument ?>
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-doc/language/functions/026.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/026.php
<?php function &returns_reference() { return $someref; } $newref = &returns_reference(); ?>
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-doc/language/functions/008.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/008.php
<?php function makecoffee($type = 'cappuccino') { return "Making a cup of $type.\n"; } echo makecoffee(); echo makecoffee(null); echo makecoffee('espresso'); ?>
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-doc/language/functions/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/000.php
<?php function foo($arg_1, $arg_2, /* ..., */ $arg_n) { echo "Example function.\n"; return $retval; } ?>
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-doc/language/functions/005.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/005.php
<?php $v = foo( $arg_1, $arg_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/03-tab/3rdparty/php-doc/language/functions/030.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/030.php
<?php class Foo { static function bar() { echo "bar\n"; } function baz() { echo "baz\n"; } } $func = array('Foo', 'bar'); $func(); // prints "bar" $func = array(new Foo, 'baz'); $func(); // prints "baz" $func = 'Foo::bar'; $func(); // prints "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-doc/language/functions/027.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/027.php
<?php function foo() { echo "In foo()<br />\n"; } function bar($arg = '') { echo "In bar(); argument was '$arg'.<br />\n"; } // This is a wrapper function around echo function echoit($string) { echo $string; } $func = 'foo'; $func(); // This calls foo() $func = 'bar'; $func('test'); // This calls bar() $func ...
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-doc/language/functions/034.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/034.php
<?php $message = 'hello'; // No "use" $example = function () { var_dump($message); }; $example(); // Inherit $message $example = function () use ($message) { var_dump($message); }; $example(); // Inherited variable's value is from when the function // is defined, not when called $message = 'world'; $example(); //...
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-doc/language/functions/035.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/035.php
<?php // A basic shopping cart which contains a list of added products // and the quantity of each product. Includes a method which // calculates the total price of the items in the cart using a // closure as a callback. class Cart { const PRICE_BUTTER = 1.0; const PRICE_MILK = 3.0; const PRICE_EGGS = 6.95; protec...
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-doc/language/functions/042.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/042.php
<?php $x = 1; $fn = fn() => $x++; // Has no effect $fn(); var_export($x); // Outputs 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-doc/language/functions/039.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/039.php
<?php $y = 1; $fn1 = fn($x) => $x + $y; // equivalent to using $y by value: $fn2 = function ($x) use ($y) { return $x + $y; }; var_export($fn1(3)); ?>
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-doc/language/functions/033.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/033.php
<?php $greet = function ($name) { printf("Hello %s\r\n", $name); }; $greet('World'); $greet('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-doc/language/functions/038.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/038.php
<?php $func = static function () { // function body }; $func = $func->bindTo(new stdClass); $func(); ?>
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-doc/language/functions/021.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/functions/021.php
<?php htmlspecialchars($string, double_encode: false); // Same as htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8', 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-doc/language/basic-syntax/006.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/006.php
<?php echo "This is a test\n"; // This is a one-line c++ style comment /* This is a multi line comment yet another line of comment */ echo "This is yet another test\n"; echo "One Final Test\n"; // This is a one-line shell-style comment ?>
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-doc/language/basic-syntax/004.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/004.php
<?php echo 'Some text'; ?> No newline <?= 'But newline now' ?>
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-doc/language/basic-syntax/001.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/001.php
<?php echo "Hello world\n"; // ... more code echo "Last statement\n"; // the script ends here with no PHP closing tag
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-doc/language/basic-syntax/002.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/002.php
<p>This is going to be ignored by PHP and displayed by the browser.</p> <?php echo 'While this is going to be parsed.'; ?> <p>This will also be ignored by PHP and displayed by the browser.</p>
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-doc/language/basic-syntax/007.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/007.php
<h1>This is an <?php // echo 'simple'; ?> example</h1> <p>The header above will say 'This is an example'.</p>
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-doc/language/basic-syntax/003.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/003.php
<?php if ($expression == true): ?> This will show if the expression is true. <?php else: ?> Otherwise this will show. <?php 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-doc/language/basic-syntax/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/000.php
1. <?php echo 'if you want to serve PHP code in XHTML or XML documents, use these tags'; ?> 2. You can use the short echo tag to <?= 'print this string' ?>. It's equivalent to <?php echo 'print this string' ?>. 3. <? echo 'this code is within short tags, but will only work ' . 'if short_open_t...
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-doc/language/basic-syntax/005.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/basic-syntax/005.php
<?php echo "This is a test\n"; ?> <?php echo "This is a test\n" ?> <?php echo "We omitted the last closing tag\n";
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-doc/language/constants/001.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/constants/001.php
<?php define('CONSTANT', 'Hello world.'); echo CONSTANT; // outputs "Hello world." echo Constant; // Emits an Error: Undefined constant "Constant" // Prior to PHP 8.0.0, outputs "Constant" and issues a warning. ?>
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-doc/language/constants/002.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/constants/002.php
<?php // Simple scalar value const CONSTANT = 'Hello World'; echo CONSTANT; // Scalar expression const ANOTHER_CONST = CONSTANT . '; Goodbye World'; echo ANOTHER_CONST; const ANIMALS = array('dog', 'cat', 'bird'); echo ANIMALS[1]; // outputs "cat" // Constant arrays define('ANIMALS', array( 'dog', 'cat', 'bir...
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-doc/language/constants/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/constants/000.php
<?php // Valid constant names define('FOO', 'something'); define('FOO2', 'something else'); define('FOO_BAR', 'something more'); // Invalid constant names define('2FOO', 'something'); // This is valid, but should be avoided: // PHP may one day provide a magical constant // that will break your script define('__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-doc/language/context/socket/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/context/socket/000.php
<?php // connect to the internet using the '192.168.0.100' IP $opts = array( 'socket' => array( 'bindto' => '192.168.0.100:0', ), ); // connect to the internet using the '192.168.0.100' IP and port '7000' $opts = array( 'socket' => array( 'bindto' => '192.168.0.100:7000', ), ); // connect to the internet usin...
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-doc/language/context/http/001.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/context/http/001.php
<?php $url = 'http://www.example.org/header.php'; $opts = [ 'http' => [ 'method' => 'GET', 'max_redirects' => '0', 'ignore_errors' => '1', ] ]; $context = stream_context_create($opts); $stream = fopen($url, 'r', false, $context); // header information as well as meta data // about the stream var_dump(stream...
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-doc/language/context/http/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/context/http/000.php
<?php $postdata = http_build_query( [ 'var1' => 'some content', 'var2' => 'doh', ] ); $opts = [ 'http' => [ 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata, ] ]; $context = stream_context_create($opts); $result = file_get_contents('http://examp...
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-doc/language/context/zip/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/language/context/zip/000.php
<?php // Read encrypted archive $opts = array( 'zip' => array( 'password' => 'secret', ), ); // create the context... $context = stream_context_create($opts); // ...and use it to fetch the data echo file_get_contents('zip://test.zip#test.txt', false, $context); ?>
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-doc/install/pecl/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/install/pecl/000.php
<?php phpinfo(); ?>
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-doc/install/macos/bundled/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/install/macos/bundled/000.php
<?php phpinfo(); ?>
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-doc/chapters/tutorial/006.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/tutorial/006.php
Hi <?php echo htmlspecialchars($_POST['name']); ?>. You are <?php echo (int) $_POST['age']; ?> years old.
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-doc/chapters/tutorial/004.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/tutorial/004.php
<?php if (str_contains($_SERVER['HTTP_USER_AGENT'], 'Firefox')) { echo 'You are using Firefox.'; } ?>
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-doc/chapters/tutorial/001.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/tutorial/001.php
<!DOCTYPE html> <html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </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-doc/chapters/tutorial/002.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/tutorial/002.php
<?php phpinfo(); ?>
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-doc/chapters/tutorial/003.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/tutorial/003.php
<?php echo $_SERVER['HTTP_USER_AGENT']; ?>
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-doc/chapters/tutorial/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/tutorial/000.php
<?php echo 'Hello World!'; ?>
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-doc/chapters/tutorial/005.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/tutorial/005.php
<?php if (str_contains($_SERVER['HTTP_USER_AGENT'], 'Firefox')) { ?> <h3>str_contains() returned true</h3> <p>You are using Firefox</p> <?php } else { ?> <h3>str_contains() returned false</h3> <p>You are not using Firefox</p> <?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-doc/chapters/intro/000.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/chapters/intro/000.php
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <?php echo "Hi, I'm a PHP script!"; ?> </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-migration2/04800-4.8-function-callable-references.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/04800-4.8-function-callable-references.php
<?php $callable = $item->doSomething(...);
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-migration2/04600-4.6-modifier-keywords.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/04600-4.6-modifier-keywords.php
<?php namespace Vendor\Package; abstract class ClassName { protected static readonly string $foo; final protected int $beep; abstract protected function zim(); final public static function bar() { // method 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-fig/per-migration2/04701-4.7-method-and-function-calls.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/04701-4.7-method-and-function-calls.php
<?php $someInstance ->create() ->prepare() ->run();
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-migration2/09001-9-enumerations.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/09001-9-enumerations.php
<?php enum Size { case Small; case Medium; case Large; public const Huge = self::Large; }
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-migration2/05200-5.2-switch-case-match.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/05200-5.2-switch-case-match.php
<?php $result = match ($a) { 'foo' => 'Foo', 'bar' => 'Bar', default => '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-fig/per-migration2/02600-2.6-trailing-commas.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/02600-2.6-trailing-commas.php
<?php $sequence = [1, 2, 3, 5, 8, 13]; function beep( string $a, string $b, string $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-migration2/10000-10-heredoc-and-nowdoc.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/10000-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-migration2/04400-4.4-methods-and-functions.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/04400-4.4-methods-and-functions.php
<?php class SubClass extends BaseClass { protected function init() {} }
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-migration2/09000-9-enumerations.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/09000-9-enumerations.php
<?php enum Suit: string { case Hearts = 'H'; case Diamonds = 'D'; case Clubs = 'C'; case Spades = 'S'; }
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-migration2/05201-5.2-switch-case-match.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/05201-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-migration2/12000-12-attributes.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/12000-12-attributes.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-migration2/07100-7.1-short-closures.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/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-migration2/04700-4.7-method-and-function-calls.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/04700-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-migration2/11000-11-arrays.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration2/11000-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-migration3/04600-4.6-modifier-keywords.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration3/04600-4.6-modifier-keywords.php
<?php class Foo { // These are all acceptable. public private(set) string $one; private(set) string $two; readonly string $three; // These are not. private(set) public string $four; }
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-migration3/04900-4.9-property-hooks.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration3/04900-4.9-property-hooks.php
<?php class Example { public string $one = 'Me' { set (string $value) { // ... } } public string $two { get { // ... } set { // ... } } public string $three { get => __CLASS__; set => ucfirst($value); } public string $four { get => __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-fig/per-migration3/06400-6.4-operator-placement.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration3/06400-6.4-operator-placement.php
<?php $variable1 = $ternaryOperatorExpr ? 'fizz' : 'buzz'; $variable2 = $possibleNullableExpr ?? 'fallback'; $variable3 = $elvisExpr ?: 'qix';
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-migration3/02500-2.5-keywords-and-types.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration3/02500-2.5-keywords-and-types.php
<?php function foo(int|string $a): User|Product { // ... } function complex(array|(ArrayAccess&Traversable) $input): ArrayAccess&Traversable { // ... } function veryComplex( array|(ArrayAccess&Traversable)|(Traversable&Countable) $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-migration3/04300-4.3-properties-and-constants.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per-migration3/04300-4.3-properties-and-constants.php
<?php class Foo { // This is allowed. private(set) string $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/04600-4.6-modifier-keywords.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04600-4.6-modifier-keywords.php
<?php namespace Vendor\Package; abstract class ClassName { protected static string $foo; private readonly int $beep; protected private(set) string $name; protected(set) string $boop; abstract protected function zim(); final public static function bar() { // ... } } readonly class ValueObject { // ......
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/04103-4.10-interface-and-abstract-properties.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04103-4.10-interface-and-abstract-properties.php
<?php interface Example { public string $readable { get; } public string $writeable { set; } public string $both { get; 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/03000-3-declare-statements-namespace-and-import-statements.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03000-3-declare-statements-namespace-and-import-statements.php
<?php /** * This file contains an example of coding styles. */ declare(strict_types=1); namespace Vendor\Package; use SomeVendor\Pack\ANamespace\SubNamespace\ClassF; use Vendor\Package\AnotherNamespace\ClassE as E; use Vendor\Package\SomeNamespace\ClassD as D; use Vendor\Package\{ClassA as A, ClassB, ClassC as 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/07002-7-closures.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/07002-7-closures.php
<?php $foo->bar( $arg1, function ($arg2) use ($var1) { // ... }, $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/04701-4.7-method-and-function-calls.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04701-4.7-method-and-function-calls.php
<?php $foo->bar( $longArgument, $longerArgument, $muchLongerArgument, );
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/04100-4.1-extends-and-implements.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04100-4.1-extends-and-implements.php
<?php namespace Vendor\Package; use OtherVendor\OtherPackage\BazClass; use BarClass as Bar; use FooClass; class ClassName extends ParentClass implements \ArrayAccess, \Countable { // ... }
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/05303-5.3-while-do-while.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05303-5.3-while-do-while.php
<?php do { // ... } 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/08000-8-anonymous-classes.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/08000-8-anonymous-classes.php
<?php $instance = new 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-fig/per/05500-5.5-foreach.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05500-5.5-foreach.php
<?php foreach ($iterable as $key => $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/04904-4.9-property-hooks.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04904-4.9-property-hooks.php
<?php class Example { public function __construct( public string $name { set { if (strlen($value) < 3) { throw new \Exception('Too short'); } $this->newName = 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/05200-5.2-switch-case-match.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05200-5.2-switch-case-match.php
<?php switch ($expr) { case 0: echo 'First case, with a break'; break; case 1: echo 'Second case, which falls through'; // no break case 2: case 3: case 4: echo 'Third case, return instead of break'; return; 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-fig/per/04900-4.9-property-hooks.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04900-4.9-property-hooks.php
<?php class Example { public string $newName = 'Me' { set (string $value) { if (strlen($value) < 3) { throw new \Exception('Too short'); } $this->newName = ucfirst($value); } } public string $department { get { return $this->values[__PROPERTY__]; } set { $this->values[__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/06300-6.3-ternary-operators.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06300-6.3-ternary-operators.php
<?php $variable = $foo ? '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/06400-6.4-operator-s-placement.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/06400-6.4-operator-s-placement.php
<?php $variable1 = $ternaryOperatorExpr ? 'fizz' : 'buzz'; $variable2 = $possibleNullableExpr ?? 'fallback'; $variable3 = $elvisExpr ?: 'qix'; $variable4 = '<foo>'|> strtoupper(...)|> htmlspecialchars(...);
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/02600-2.6-trailing-commas.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/02600-2.6-trailing-commas.php
<?php function beep(string $a, string $b, string $c) { // ... } function beep( string $a, string $b, string $c, ) { // ... } $arr = ['a' => 'A', 'b' => 'B', 'c' => 'C']; $arr = [ 'a' => 'A', 'b' => 'B', 'c' => 'C', ]; $result = match ($a) { 'foo' => 'Foo', 'bar' => 'Bar', default => '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-fig/per/04704-4.7-method-and-function-calls.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04704-4.7-method-and-function-calls.php
<?php $someInstance ->create() ->prepare() ->run();
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/10001-10-heredoc-and-nowdoc.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/10001-10-heredoc-and-nowdoc.php
<?php function notAllowed() { $notAllowed = <<<'COUNTEREXAMPLE' This is not allowed. COUNTEREXAMPLE; }
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/00000-overview.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/00000-overview.php
<?php declare(strict_types=1); namespace Vendor\Package; use Vendor\Package\SomeNamespace\ClassD as D; use Vendor\Package\{ClassA as A, ClassB, ClassC as C}; use function Vendor\Package\{functionA, functionB, functionC}; use const Vendor\Package\{ConstantA, ConstantB, ConstantC}; class Foo extends Bar implements 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-fig/per/04203-4.2-using-traits.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04203-4.2-using-traits.php
<?php class Talker { use A; use B { A::smallTalk insteadof B; } use C { B::bigTalk insteadof C; C::mediumTalk as FooBar; } }
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/03001-3-declare-statements-namespace-and-import-statements.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/03001-3-declare-statements-namespace-and-import-statements.php
<?php use Vendor\Package\SomeNamespace\{ SubnamespaceOne\ClassA, SubnamespaceOne\ClassB, SubnamespaceTwo\ClassY, 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/08001-8-anonymous-classes.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/08001-8-anonymous-classes.php
<?php // Brace on the same line // No arguments $instance = new class extends \Foo implements \HandleableInterface { // ... }; // Brace on the next line // Constructor arguments $instance = new class($a) extends \Foo implements \ArrayAccess, \Countable, \Serializable { public function __construct( public int $...
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/04101-4.1-extends-and-implements.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04101-4.1-extends-and-implements.php
<?php namespace Vendor\Package; use OtherVendor\OtherPackage\BazClass; use BarClass as Bar; use FooClass; class ClassName extends ParentClass implements \ArrayAccess, \Countable, \Serializable { // ... }
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/04501-4.5-method-and-function-parameters.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04501-4.5-method-and-function-parameters.php
<?php namespace Vendor\Package; class ClassName { public function aVeryLongMethodName( ClassTypeHint $arg1, &$arg2, array $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/04001-4-classes-properties-and-methods.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04001-4-classes-properties-and-methods.php
<?php class MyException extends \RuntimeException {}
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/05400-5.4-for.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/05400-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/10000-10-heredoc-and-nowdoc.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/10000-10-heredoc-and-nowdoc.php
<?php $notAllowed = <<<'COUNTEREXAMPLE' This is not allowed. COUNTEREXAMPLE;
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/04401-4.4-methods-and-functions.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04401-4.4-methods-and-functions.php
<?php function fooBarBaz($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/04200-4.2-using-traits.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04200-4.2-using-traits.php
<?php namespace Vendor\Package; use Vendor\Package\FirstTrait; use Vendor\Package\SecondTrait; use Vendor\Package\ThirdTrait; class ClassName { use FirstTrait; use SecondTrait; use ThirdTrait; }
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/04400-4.4-methods-and-functions.php
tests/fixtures/Formatter/out/03-tab/3rdparty/php-fig/per/04400-4.4-methods-and-functions.php
<?php namespace Vendor\Package; class ClassName { public function fooBarBaz($arg1, &$arg2, $arg3 = []) { // ... } }
php
MIT
5d244a4b7a9b484581edbb5df596a4e76ba17fa6
2026-01-05T04:31:39.990954Z
false