We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9305063 commit d337309Copy full SHA for d337309
judge/judgedaemon.main.php
@@ -1784,5 +1784,25 @@ private function initsignals(): void
1784
|> str_shuffle(...)
1785
|> trim(...);
1786
1787
+interface I {
1788
+ // We may naively assume that the PHP constant is always a string.
1789
+ const PHP = 'PHP 8.2';
1790
+}
1791
+
1792
+class Foo implements I {
1793
+ // But implementing classes may define it as an array.
1794
+ const PHP = [];
1795
1796
1797
+class Foo2 {
1798
+ const PHP = 'PHP 8.3';
1799
1800
1801
+$searchableConstant = 'PHP';
1802
1803
+var_dump(json_validate('{ "test": { "foo": "bar" } }')); // true
1804
1805
+var_dump(Foo2::{$searchableConstant});
1806
1807
$daemon = new JudgeDaemon();
1808
$daemon->run();
0 commit comments