1--TEST--
2Register Alloction 001: Spilling in "identical" code
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.protect_memory=1
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12class Caster
13{
14    const EXCLUDE_PUBLIC = 8;
15    const EXCLUDE_PRIVATE = 32;
16    const EXCLUDE_STRICT = 512;
17
18    public static function filter(array $a, $filter): int
19    {
20        foreach ($a as $k => $v) {
21            if (!isset($k[1])) {
22                $type |= self::EXCLUDE_PUBLIC;
23            } else {
24                $type |= self::EXCLUDE_PRIVATE;
25            }
26
27            if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) {
28            }
29        }
30
31        return $a;
32    }
33
34}
35?>
36OK
37--EXPECT--
38OK
39