Re: PHP6 new syntax use suggestion

From: Date: Fri, 23 May 2008 14:51:42 +0000
Subject: Re: PHP6 new syntax use suggestion
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-37829@lists.php.net to get a copy of this message
> I have a suggestion for upcoming PHP6 as it's a major version change. I > suggest a possibility to use this (example): > > $host = > parse_url('http://someurl.com')['host']; > > instead of > > $host = parse_url('http://someurl.com'); > $host = $host['host']; I can't see any real benefit of this change apart from a WTF factor... its possible i'm missing something though! Whats the benefit apart from saving a line of code? Why not just skip the second line and use $host['host'] instead of copying it to $host ? Regards Marco

« previous php.internals (#37829) next »