1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Files
archived-php-src/ext/opcache/tests/jit/reg_alloc_023.phpt
2024-01-15 09:39:13 +01:00

48 lines
1.4 KiB
PHP

--TEST--
Register Alloction 023: PI to PHI forwarding
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
--FILE--
<?php
class test {
public function foo(string $key, int $start, int $end, ?string $type = null): void
{
if (isset($this->a[$key])) {
foreach ($this->a[$key] as $i => $data) {
if ($data->from >= $start && $data->from <= $end) {
if ($type === null || $type === $data->type) {
unset($this->a[$key][$i]);
}
}
}
}
if (isset($this->type_map[$key])) {
foreach ($this->b[$key] as $map_start => $_) {
if ($map_start >= $start && $map_start <= $end) {
unset($this->b[$key][$map_start]);
}
}
}
if (isset($this->c[$key])) {
foreach ($this->c[$key] as $map_start => $_) {
if ($map_start >= $start && $map_start <= $end) {
unset($this->c[$key][$map_start]);
}
}
}
if (isset($this->d[$key])) {
foreach ($this->d[$key] as $map_start => $_) {
if ($map_start >= $start && $map_start <= $end) {
unset($this->d[$key][$map_start]);
}
}
}
}
}
?>
DONE
--EXPECT--
DONE