diff options
author | Tyson Andre <tysonandre775@hotmail.com> | 2020-06-07 13:17:40 -0400 |
---|---|---|
committer | Tyson Andre <tysonandre775@hotmail.com> | 2020-06-08 09:17:13 -0400 |
commit | 543684e7962073dcae3ecdd9504211876e630bec (patch) | |
tree | 00430fdf951bacb16017d127fd6686bc3bacbc19 /main/php_variables.c | |
parent | 3d4f79d6782299ee8fc0eb14eb858bedef23c5cd (diff) | |
download | php-git-543684e7962073dcae3ecdd9504211876e630bec.tar.gz |
Optimize out no-op `yield from` statements
If the array is empty, then I'd expect that the generator is never left,
and that can be converted to a no-op and the return value would always be `null`.
Make `yield from [];` as efficient as `if (false) { yield null; }`
when opcache's sccp pass is enabled.
Closes GH-5679
Diffstat (limited to 'main/php_variables.c')
0 files changed, 0 insertions, 0 deletions