mirror of
https://github.com/php/php-src.git
synced 2024-09-30 06:16:08 +00:00
114245c1b9
This also reverses the destruction order of the pushed arguments to align with how it is done everywhere else. I'm not exactly sure whether this is the right way to fix it, but it seems to work fine.
31 lines
441 B
PHP
31 lines
441 B
PHP
--TEST--
|
|
Test nested calls with die() in a generator
|
|
--FILE--
|
|
<?php
|
|
|
|
function gen() {
|
|
die('Test');
|
|
yield; // force generator
|
|
}
|
|
|
|
function function_with_3_args() {
|
|
$gen = gen();
|
|
$gen->rewind();
|
|
}
|
|
|
|
function function_with_4_args() {
|
|
function_with_3_args(4, 5, 6);
|
|
}
|
|
|
|
function outerGen() {
|
|
function_with_4_args(0, 1, 2, 3);
|
|
yield; // force generator
|
|
}
|
|
|
|
$outerGen = outerGen();
|
|
$outerGen->rewind();
|
|
|
|
?>
|
|
--EXPECT--
|
|
Test
|