On Tue, Jan 29, 2013 at 9:18 AM, David Mintz <da...@davidmintz.org> wrote:
> On Tue, Jan 29, 2013 at 9:43 AM, Anthony Ferrara <ircmax...@gmail.com>wrote: > >> The constructor's return value is always ignored internally. So the only >> time the constructor's return is ever used is in a child-class. >> >> if (parent::__construct()) { >> // blah >> } >> >> > You lost me there. If it's always ignored... always means always, right? > It's always ignored *internally*, i.e. you'll never get a return value from `new Foo()`. PHP just ignores whatever you return, and hands you your new instance of Foo. But if you call parent::__construct() from inside a constructor, you can get the return value from the parent constructor. I wouldn't though :) -- justin
_______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show-participation