-
-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathLowerCaseKeywordUnitTest.inc.fixed
More file actions
76 lines (67 loc) · 1.63 KB
/
Copy pathLowerCaseKeywordUnitTest.inc.fixed
File metadata and controls
76 lines (67 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
// A few keywords. Obviously not valid syntax.
class Something extends SomethingElse implements Whatever {}
abstract public private protected function whatever() {}
const array();
foreach ($var as $var) { exit; }
if ($a and $b or $c xor $d) { die; } elseif( $var ) { } else {}
goto a;
class Something extends SomethingElse implements Whatever {}
abstract public private protected function whatever() {}
const array();
foreach ($var as $var) { exit; }
if ($a and $b or $c xor $d) { die; } elseif( $var ) { } else {}
goto a;
$b = function (Array $a) {};
const PRIVATE;
HttpStatus::CONTINUE;
$c = function ($f) {
yield $f;
yield from fun();
};
class X extends Y {
public function m() {
parent::m();
}
public function n() {
self::n();
}
}
fn ($x) => $x;
$r = match ($x) {
1 => 1,
2 => 2,
default, => 3,
};
class Reading {
public readonly int $var;
}
enum ENUM: string
{
case HEARTS;
}
new class {};
new class extends stdClass {};
new class {};
if (isset($a) && !empty($a)) { unset($a); }
if (isset($a) && !empty($a)) { unset($a); }
eval('foo');
eval('foo');
$c = function() {
yield /*comment*/ from fun();
yield
/*comment*/
from fun();
}
class AsymmetricVisibility {
public(set) int $correctPublicSet;
protected(set) int $correctProtectedSet;
private(set) int $correctPrivateSet;
public(set) int $wrongCasePublic;
protected(set) array $wrongCaseProtected;
protected(set) int $wrongCaseProtectedSet;
private(set) int $wrongCasePrivate;
private(set) readonly ?string $wrongCasePrivateSet;
}
__HALT_COMPILER(); // An exception due to phar support.
function