Re: [nyphp-talk] PHP 5.4.0

2012-03-05 Thread David Mintz
On Fri, Mar 2, 2012 at 11:20 AM, Federico Ulfo wrote: > Short code, is cool > $name = (new DB)->get_row()["name"]; > > class member access on instantiation! Yay! -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ ___ Ne

Re: [nyphp-talk] PHP 5.4.0

2012-03-02 Thread Chris Snyder
On Fri, Mar 2, 2012 at 12:06 PM, Federico Ulfo wrote: > I've to correct what I wrote before about traits. > > PHP 5.4 implements traits instead of multiple inheritance, because the > multiple inheritance can cause the "diamond problem" > http://en.wikipedia.org/wiki/Diamond_problem That article e

Re: [nyphp-talk] PHP 5.4.0

2012-03-02 Thread Federico Ulfo
I've to correct what I wrote before about traits. PHP 5.4 implements traits instead of multiple inheritance, because the multiple inheritance can cause the "diamond problem" http://en.wikipedia.org/wiki/Diamond_problem On Fri, Mar 2, 2012 at 11:20 AM, Federico Ulfo wrote: > Short code, is cool

Re: [nyphp-talk] PHP 5.4.0

2012-03-02 Thread Federico Ulfo
Short code, is cool $name = (new DB)->get_row()["name"]; Short array is nice [ "user" => [ "name" => "Neytiri", "color" => "blue", "language" => "Na-vi" ] ]; http://php.net/ChangeLog-5.php On Fri, Mar 2, 2012 at 10:48 AM, Rob Marscher wrote: > > On Mar 2, 2012, at 8:24 AM, Chris Snyder wrote:

Re: [nyphp-talk] PHP 5.4.0

2012-03-02 Thread Rob Marscher
On Mar 2, 2012, at 8:24 AM, Chris Snyder wrote: > It's a little thing, but I'm looking forward to being able to declare > arrays using the short syntax: > > $items = []; Me too. There was an RFC for javascript-style object literals which I was really excited about, but it was pretty much shot

Re: [nyphp-talk] PHP 5.4.0

2012-03-02 Thread Anthony W.
I am looking forward to array dereferencing from function return statements. function foo() { return array('awesomeness'=>'PHP'); } echo foo()['awesomeness']; -- Anthony W. ant92...@gmail.com ___ New York PHP User Group Community Talk Mailing Lis

[nyphp-talk] PHP 5.4.0

2012-03-02 Thread Chris Snyder
PHP 5.4 is finally ready for the show. Have you used it? Any gotchas? http://php.net/releases/5_4_0.php It's a little thing, but I'm looking forward to being able to declare arrays using the short syntax: $items = []; No more register globals, no more magic quotes, and no more safe mode. Our lit