News for hackers. Stuff that matters.
Re:PHP 8.5 Adds Pipe Operator: What it means by donatj on Tuesday August 05, 2025 @06:02PM (#44804991)
If PHP scoped to blocks, it would be less of an issue, you could just wrap your procedural code in curly braces and call it a day

    {
        $foo = 'bar'; // only defined in this block
    }
I use this reasonably often in Go, I wish it were a thing in PHP. PHP allows blocks like this but they seem to be noops best I can tell.

There are no comments on this comment yet.