Merge branch 'failing-tests' of https://github.com/peachpiecompiler/peachpie into failing-tests
This commit is contained in:
Коммит
3c5047ba8c
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
namespace constructs\matchexpr;
|
||||
|
||||
// we have to use eval for PHP < 8.0
|
||||
if (defined("T_MATCH")) {
|
||||
$x = 123;
|
||||
eval('echo match($x) {
|
||||
10 => 1,
|
||||
20 => 2,
|
||||
"hello" => 3,
|
||||
123 => 4,
|
||||
default => 5,
|
||||
};');
|
||||
}
|
||||
else {
|
||||
echo 4;
|
||||
}
|
||||
|
||||
echo "Done.";
|
Загрузка…
Ссылка в новой задаче