On Tue, May 12, 2015 at 2:49 PM, Christoph Becker <[email protected]> wrote:
> Bishop Bettini wrote:
>
> > class Foo {
> > public static function bar() { echo 'bar'; }
> > }
> > Foo:bar();
> >
> >
> > Note the single colon. According to 3v4l <http://3v4l.org/Ot3Fk>...
>
> Foo:bar();
>
> is the same as
>
> Foo:
> bar();
>
> so it is parsed as labelled statement, and as such is syntactically
> valid since PHP 5.3.
>
Ah, labels, right. Thanks!
I will now go off and grumble that labels should mandate, rather than just
accept, block scope since it's easy to forget one half of Paamayim
Nekudotayim....