mirror of
https://github.com/php/php-src.git
synced 2026-04-29 11:13:36 +02:00
e9f783fcdd
For rationale, see #6787 Extensions migrated in part 3: * ftp * gmp * iconv * opcache * shmop
41 lines
613 B
PHP
41 lines
613 B
PHP
--TEST--
|
|
Switch jumptable generation
|
|
--INI--
|
|
opcache.enable=1
|
|
opcache.enable_cli=1
|
|
opcache.file_update_protection=0
|
|
opcache.jit_buffer_size=1M
|
|
--EXTENSIONS--
|
|
opcache
|
|
--FILE--
|
|
<?php
|
|
|
|
function test1(string $val) {
|
|
switch ($val) {
|
|
case 'str1':
|
|
case 'str2':
|
|
echo "correct\n";
|
|
return;
|
|
}
|
|
echo "wrong\n";
|
|
}
|
|
function test2(int $val) {
|
|
switch ($val) {
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
echo "correct\n";
|
|
return;
|
|
}
|
|
echo "wrong\n";
|
|
}
|
|
test1("str1");
|
|
test2(1);
|
|
|
|
?>
|
|
--EXPECT--
|
|
correct
|
|
correct
|