Re: [PHP-DEV] [RFC] Return type-hint

2011-04-29 Thread Ferenc Kovacs
On Fri, Apr 29, 2011 at 7:04 AM, Stas Malyshev wrote: > Hi! > > > yeah, but usually you return null/false in case of error when you write >> procedural code. >> > > Nope. I use it all the time when writing OO code and when "nothing" or "no > object" or "can't do this" is a valid answer for a func

Re: [PHP-DEV] Making SimpleXML more useful

2011-04-29 Thread Tom Samplonius
> While I think this would make SimpleXML more stupid, not less, as it > seems > braindead to me to allow users to create documents ambiguously and/or > which > essentially violate the XML namespace spec, I think the way to do Allowing child elements to be unqualified is neither braindead or am

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-29 Thread Alain Williams
On Thu, Apr 28, 2011 at 10:05:01PM -0700, Stas Malyshev wrote: > Hi! > > >I will accept that sometimes it must always be done run time, eg: > > > > $funcName($arg) > > > >but that still allows most calls at compile time. > > This is not the issue. This is the issue: $foo->bar($arg). > There's

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-29 Thread Ferenc Kovacs
> > > Which might be acceptable for some applications. For those where it is not >> then this feature may not be useful. This is an *optional* declaration, >> not mandatory - so if it does not suit your purpose -- don't use it. >> > > You are talking about pretty big change in language nature - in

Re: [PHP-DEV] Making SimpleXML more useful

2011-04-29 Thread Ben Schmidt
While I think this would make SimpleXML more stupid, not less, as it seems braindead to me to allow users to create documents ambiguously and/or which essentially violate the XML namespace spec, I think the way to do Allowing child elements to be unqualified is neither braindead or ambiguous. A

Re: [PHP-DEV] Making SimpleXML more useful

2011-04-29 Thread Rob Richards
On 4/29/11 3:44 AM, Tom Samplonius wrote: While I think this would make SimpleXML more stupid, not less, as it seems braindead to me to allow users to create documents ambiguously and/or which essentially violate the XML namespace spec, I think the way to do Allowing child elements to be unqu

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-29 Thread Martin Scotta
Martin Scotta On Thu, Apr 28, 2011 at 5:15 PM, Peter Lind wrote: > 2011/4/28 Martin Scotta : > > * snip * > > > IMHO I would not trust on any return value, as PHP did not ensure > anything > > about them. > > Even more, I do not write code that depend on return values, I prefer to > > use inpu

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-29 Thread Peter Lind
On Apr 29, 2011 4:47 PM, "Martin Scotta" wrote: > > > Martin Scotta > > > On Thu, Apr 28, 2011 at 5:15 PM, Peter Lind wrote: >> >> 2011/4/28 Martin Scotta : >> >> * snip * >> >> > IMHO I would not trust on any return value, as PHP did not ensure anything >> > about them. >> > Even more, I do not

[PHP-DEV] sockets and non-Linux

2011-04-29 Thread Johannes Schlüter
Gustavo, when building trunk on Solaris I get some errors as struct ifreq contains no member ifr_ifindex and SIOCGIFNAME, SIOCGIFADDR, SIOCGIFINDEX and maybe others which are used in ext/sockets/multicast.c aren't defined. Can you look into this? johannes -- PHP Internals - PHP Runtime Devel

Re: [PHP-DEV] Making SimpleXML more useful

2011-04-29 Thread Tom Samplonius
> > $sxe->addChild('child', 123); # Adds element with namespace > > inherited from the parent > > $sxe->addChild('child', 123, 'urn:somenamespace'); # Adds child > > with specified namespace > > $sxe->addChild('child', 123, -1); # Adds child with no namespace > > qualification > > Again, there is