1--TEST--
2Register Alloction 002: SEND_VAL_EX uses %r0 as a temporary register
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 A {
13    public function process($call) {
14        $i = 0;
15        foreach (array("a", "b", "c") as $attr) {
16            $call($i++, "xxx");
17        }
18    }
19}
20
21$a = new A();
22$a->process(function($i, $v) { var_dump($i); });
23?>
24--EXPECT--
25int(0)
26int(1)
27int(2)
28