Skip to content
Code-Schnipsel Gruppen Projekte
Commit 041186ca erstellt von Jan Wennrich's avatar Jan Wennrich
Dateien durchsuchen

test(ValidPhp81Class): correct syntax

Übergeordneter 171a1a2a
No related branches found
No related tags found
2 Merge Requests!2Next,!1Dev
Pipeline #6636 bestanden mit Phase
in 9 Sekunden
......@@ -6,6 +6,7 @@ namespace A {
AnotherClassName,
OneMoreClassName
};
use Foo\Bar;
$instance = new class {
};
......@@ -15,13 +16,20 @@ namespace A {
return 0;
}
#[Attribute]
#[Attribute(1, 2)]
function test()
{
return 'hello';
}
function bar(
$x,
$y,
int $z = 1
) {
$x = 0;
// $x = 1
// $x = 1
do {
$y += 1;
} while ($y < 10);
......@@ -207,38 +215,39 @@ namespace A {
protected abstract function fFour();
}
}
function f($a, $ab, $abc)
{
}
f(
a: 1,
ab: 2,
abc: 3
);
$j = 0;
function f($a, $ab, $abc)
{
}
function f2(array $arr)
{
}
f(
a: 1,
ab: 2,
abc: 3
);
$j = 0;
f2([
0 => 5,
1 => 7,
]);
echo match ($j) {
0 => 'zero',
2 => 'two',
42 => 'forty-two',
default => throw new Exception()
};
enum Suit: string
{
case Clubs = 'C';
case Diamonds = 'D';
case Hearts = 'H';
case Spades = 'S';
function f2(array $arr)
{
}
f2([
0 => 5,
1 => 7,
]);
echo match ($j) {
0 => 'zero',
2 => 'two',
42 => 'forty-two',
default => throw new Exception()
};
enum Suit: string
{
case Clubs = 'C';
case Diamonds = 'D';
case Hearts = 'H';
case Spades = 'S';
}
}
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren