Stuttering PHP¶
<?php
const from = ['yield from'];
$a = fn () => yield yield from from;
foreach($a() as $b) {
print $b;
}
Not a great joke, but it made me chuckle.
Keep in mind that the first yield actually produces a null, which is displayed as empty string, hence it is not visible.
May be, some PHP words may be forbidden, or, at least, avoided.
See Also¶
Stuttering PHP [Try me]
PHP Features¶
Last updated: 14 July 2026