Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

PHP Features

Last updated: 10 September 2026