<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: [PHP6] function-return-array idea!</title>
	<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html</link>
	<description>Everything opensource</description>
	<pubDate>Tue, 18 Nov 2008 09:16:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>

	<item>
		<title>By: TheGuy</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-53</link>
		<author>TheGuy</author>
		<pubDate>Fri, 07 Sep 2007 11:11:26 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-53</guid>
					<description>learn some english, then make demands</description>
		<content:encoded><![CDATA[<p>learn some english, then make demands</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: PHPDeveloper.org</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-55</link>
		<author>PHPDeveloper.org</author>
		<pubDate>Fri, 07 Sep 2007 18:05:38 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-55</guid>
					<description>&lt;strong&gt;Stijn Leenknegt's Blog: [PHP6] function-return-array idea!...&lt;/strong&gt;

...</description>
		<content:encoded><![CDATA[<p><strong>Stijn Leenknegt&#8217;s Blog: [PHP6] function-return-array idea!&#8230;</strong></p>
<p>&#8230;</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Stijn Leenknegt</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-56</link>
		<author>Stijn Leenknegt</author>
		<pubDate>Fri, 07 Sep 2007 19:30:23 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-56</guid>
					<description>My english is bad, but if you are real coders you should understand this "problem" only by reading the code!</description>
		<content:encoded><![CDATA[<p>My english is bad, but if you are real coders you should understand this &#8220;problem&#8221; only by reading the code!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: developercast.com &#187; Stijn Leenknegt&#8217;s Blog: [PHP6] function-return-array idea!</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-58</link>
		<author>developercast.com &#187; Stijn Leenknegt&#8217;s Blog: [PHP6] function-return-array idea!</author>
		<pubDate>Fri, 07 Sep 2007 20:44:09 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-58</guid>
					<description>[...] Leenknegt has posted a suggestion of his directed towards the developers behind PHP6 for a different way to return array values that [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Leenknegt has posted a suggestion of his directed towards the developers behind PHP6 for a different way to return array values that [&#8230;]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Kevin Haynes</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-59</link>
		<author>Kevin Haynes</author>
		<pubDate>Fri, 07 Sep 2007 23:59:49 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-59</guid>
					<description>This is a really good idea. Let's hope the PHP 6 dev team gets wind of it and decides to include it.</description>
		<content:encoded><![CDATA[<p>This is a really good idea. Let&#8217;s hope the PHP 6 dev team gets wind of it and decides to include it.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: dmondark</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-61</link>
		<author>dmondark</author>
		<pubDate>Sat, 08 Sep 2007 00:42:58 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-61</guid>
					<description>@TheGuy
If all english speakers are such smart guys, the world would be a great place to live it. Besides, all the great web programming languages where created by NON-ENGLISH speakers. So my suggestion to you is to go grab a bear in one hand and a tv remote in the other and find a sofa to spend your rest of your life on.

@Stijn
Sorry I had to reply that "Guy"... Nice suggestion, I will try adding it to the php parser. I will try to send you the C++ code if you want so you can post it as part of the suggestion to the PHP team.</description>
		<content:encoded><![CDATA[<p>@TheGuy<br />
If all english speakers are such smart guys, the world would be a great place to live it. Besides, all the great web programming languages where created by NON-ENGLISH speakers. So my suggestion to you is to go grab a bear in one hand and a tv remote in the other and find a sofa to spend your rest of your life on.</p>
<p>@Stijn<br />
Sorry I had to reply that &#8220;Guy&#8221;&#8230; Nice suggestion, I will try adding it to the php parser. I will try to send you the C++ code if you want so you can post it as part of the suggestion to the PHP team.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-63</link>
		<author>Sean</author>
		<pubDate>Sat, 08 Sep 2007 04:59:33 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-63</guid>
					<description>This is done in other languages (Python being one of them) and it's great. I'd love to see that in PHP.</description>
		<content:encoded><![CDATA[<p>This is done in other languages (Python being one of them) and it&#8217;s great. I&#8217;d love to see that in PHP.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Dennis</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-64</link>
		<author>Dennis</author>
		<pubDate>Sat, 08 Sep 2007 08:36:37 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-64</guid>
					<description>This is a well known problem of Zend Engine, and this syntax would definitely help a lot.</description>
		<content:encoded><![CDATA[<p>This is a well known problem of Zend Engine, and this syntax would definitely help a lot.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Thomas Koch</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-65</link>
		<author>Thomas Koch</author>
		<pubDate>Sat, 08 Sep 2007 10:02:12 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-65</guid>
					<description>No. Because:

You should not return data structures as arrays! Returning arrays is only allowed in terms of "clean" programming, if the array is a list of similiar elements.
If you want to return a data structure, then return it as an object:

echo returnObject()-&#62;someProperty-&#62;functionObj1();

If you're using an opcode cache, then there's nearly no performance loss in using objects instead of arrays.</description>
		<content:encoded><![CDATA[<p>No. Because:</p>
<p>You should not return data structures as arrays! Returning arrays is only allowed in terms of &#8220;clean&#8221; programming, if the array is a list of similiar elements.<br />
If you want to return a data structure, then return it as an object:</p>
<p>echo returnObject()-&gt;someProperty-&gt;functionObj1();</p>
<p>If you&#8217;re using an opcode cache, then there&#8217;s nearly no performance loss in using objects instead of arrays.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Stijn Leenknegt</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-67</link>
		<author>Stijn Leenknegt</author>
		<pubDate>Sat, 08 Sep 2007 10:37:37 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-67</guid>
					<description>@dmondark: you may try that :) would be nice, less work for the php dev team :p
@Thomas Koch: it's not only for classes, but also for functions.</description>
		<content:encoded><![CDATA[<p>@dmondark: you may try that <img src='http://www.eos-team.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> would be nice, less work for the php dev team :p<br />
@Thomas Koch: it&#8217;s not only for classes, but also for functions.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: MonkeyT</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-68</link>
		<author>MonkeyT</author>
		<pubDate>Sat, 08 Sep 2007 12:45:29 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-68</guid>
					<description>@Thomas Koch: That's a fairly Object Obsessive Programming point of view.  I understand the advantages of returning an object when you need the structure, but given PHP's history as a procedural, loosely-typed language, I see no problem with providing a syntax for returning arrays.  There's nothing to prevent you from returning a single object if you want to.</description>
		<content:encoded><![CDATA[<p>@Thomas Koch: That&#8217;s a fairly Object Obsessive Programming point of view.  I understand the advantages of returning an object when you need the structure, but given PHP&#8217;s history as a procedural, loosely-typed language, I see no problem with providing a syntax for returning arrays.  There&#8217;s nothing to prevent you from returning a single object if you want to.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: CJ</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-69</link>
		<author>CJ</author>
		<pubDate>Sat, 08 Sep 2007 19:29:21 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-69</guid>
					<description>Excellent idea! This can be done in javascript, why not PHP?</description>
		<content:encoded><![CDATA[<p>Excellent idea! This can be done in javascript, why not PHP?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Amenthes</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-70</link>
		<author>Amenthes</author>
		<pubDate>Mon, 10 Sep 2007 07:34:43 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-70</guid>
					<description>I dont know if PHP's internal implementation of arrays shares something with the implementation of the objects implementing the ArrayAccess interface but if they ever decide to make your idea possible I want to also be able to do:

$myObject-&#62;method()[1];

where method() returns an object implementing the ArrayAccess interface.</description>
		<content:encoded><![CDATA[<p>I dont know if PHP&#8217;s internal implementation of arrays shares something with the implementation of the objects implementing the ArrayAccess interface but if they ever decide to make your idea possible I want to also be able to do:</p>
<p>$myObject-&gt;method()[1];</p>
<p>where method() returns an object implementing the ArrayAccess interface.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Thijs Lensselink</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-71</link>
		<author>Thijs Lensselink</author>
		<pubDate>Mon, 10 Sep 2007 14:28:46 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-71</guid>
					<description>Great idea. But to get more exposure from the PHP dev team. It's probably better to post it to the internals list as a suggestion for the upcomming 5.3.</description>
		<content:encoded><![CDATA[<p>Great idea. But to get more exposure from the PHP dev team. It&#8217;s probably better to post it to the internals list as a suggestion for the upcomming 5.3.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Joakim Nygård</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-72</link>
		<author>Joakim Nygård</author>
		<pubDate>Mon, 10 Sep 2007 14:48:57 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-72</guid>
					<description>I have often been annoyed by the need to split into two statements. It would be well in line with the chaining that ZF for instance is supporting:

$object-&#62;getOtherObject()-&#62;getProperty();

One problem is obviously what would happen if the function fails for some reason.   Writing it compact like this makes it impossible to verify the return value before continuing.

I think it will be difficult to introduce this feature without better support for declaring return types of functions.</description>
		<content:encoded><![CDATA[<p>I have often been annoyed by the need to split into two statements. It would be well in line with the chaining that ZF for instance is supporting:</p>
<p>$object-&gt;getOtherObject()-&gt;getProperty();</p>
<p>One problem is obviously what would happen if the function fails for some reason.   Writing it compact like this makes it impossible to verify the return value before continuing.</p>
<p>I think it will be difficult to introduce this feature without better support for declaring return types of functions.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-79</link>
		<author>Paul</author>
		<pubDate>Sat, 29 Sep 2007 13:41:53 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-79</guid>
					<description>I think this is a great idea for PHP6, it would sure make life easier.</description>
		<content:encoded><![CDATA[<p>I think this is a great idea for PHP6, it would sure make life easier.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Stijn Leenknegt</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-82</link>
		<author>Stijn Leenknegt</author>
		<pubDate>Thu, 11 Oct 2007 22:26:24 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-82</guid>
					<description>I add something to my blog article. Javascript use this to. Next example shows it.

document.getElementsByTagName('input')[1].getAttribute('value');

Is javascript owning php? I hope not :p</description>
		<content:encoded><![CDATA[<p>I add something to my blog article. Javascript use this to. Next example shows it.</p>
<p>document.getElementsByTagName(&#8217;input&#8217;)[1].getAttribute(&#8217;value&#8217;);</p>
<p>Is javascript owning php? I hope not :p</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: music box</title>
		<link>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-122</link>
		<author>music box</author>
		<pubDate>Wed, 21 Nov 2007 11:38:41 +0000</pubDate>
		<guid>http://www.eos-team.org/2007/09/06/php6-function-return-array-idea.html#comment-122</guid>
					<description>Insanity: a perfectly rational adjustment to the insane world.</description>
		<content:encoded><![CDATA[<p>Insanity: a perfectly rational adjustment to the insane world.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
