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.jit_buffer_size=1M 8opcache.protect_memory=1 9--EXTENSIONS-- 10opcache 11--FILE-- 12<?php 13class A { 14 public function process($call) { 15 $i = 0; 16 foreach (array("a", "b", "c") as $attr) { 17 $call($i++, "xxx"); 18 } 19 } 20} 21 22$a = new A(); 23$a->process(function($i, $v) { var_dump($i); }); 24?> 25--EXPECT-- 26int(0) 27int(1) 28int(2) 29