Nice trick, I will remember this one.
Thanks for sharing,
Nitsan
On 23/05/2008, Nathan Nobbe [EMAIL PROTECTED] wrote:
On Fri, Feb 29, 2008 at 12:16 AM, Nathan Nobbe [EMAIL PROTECTED]
wrote:
wow, im going to have to stare at some of those and play around with them
as soon as im half awake
On Fri, Feb 29, 2008 at 12:16 AM, Nathan Nobbe [EMAIL PROTECTED]
wrote:
wow, im going to have to stare at some of those and play around with them
as soon as im half awake :)
of course i still like my solution ;) but im excited about the
experimentation and ideas that have been shared on
Nathan Rixham wrote:
Nathan Nobbe wrote:
On Thu, Feb 28, 2008 at 6:14 PM, Nathan Rixham [EMAIL PROTECTED] wrote:
if I show you guys how to do this:
echo sillyFunc()['a'] . PHP_EOL;
using a few brackets and things do you promise not to laugh?
*it's a bit weird*
id like to see it.
Nathan Nobbe wrote:
all,
as we have discussed previously, php does not have support for retrieving
array values on the same line in which they are returned. i have created a
simple workaround, and would like to share. first there is the class (w/
other features omitted for the post)
?php
On Thu, Feb 28, 2008 at 2:36 PM, Ray Hauge [EMAIL PROTECTED]
wrote:
That's pretty cool. I wasn't sure if it would work with numerically
indexed arrays, so I tried:
// sillyFunc returns array(0=1, 1=2);
ArrayClass::create(sillyFunc())-{0}
I just tested it, and that works. If you leave
On Thu, Feb 28, 2008 at 2:16 PM, Nathan Nobbe [EMAIL PROTECTED] wrote:
all,
as we have discussed previously, php does not have support for retrieving
array values on the same line in which they are returned. i have created a
simple workaround, and would like to share. first there is the
Nathan Nobbe wrote:
all,
as we have discussed previously, php does not have support for retrieving
array values on the same line in which they are returned. i have created a
simple workaround, and would like to share. first there is the class (w/
other features omitted for the post)
?php
Nathan Nobbe wrote:
On Thu, Feb 28, 2008 at 2:36 PM, Ray Hauge [EMAIL PROTECTED]
wrote:
That's pretty cool. I wasn't sure if it would work with numerically
indexed arrays, so I tried:
// sillyFunc returns array(0=1, 1=2);
ArrayClass::create(sillyFunc())-{0}
I just tested it, and that
On Thu, Feb 28, 2008 at 4:22 PM, Jim Lucas [EMAIL PROTECTED] wrote:
So, I guess my question would be, why not take it one level deeper.
?php
include('ArrayClass.php');
function sillyFunc() {
return ArrayClass::create(array('a' = 1, 'b' = 2, 'c' = 3, 'd' =
4));
}
echo sillyFunc()-a
On Thu, Feb 28, 2008 at 6:14 PM, Nathan Rixham [EMAIL PROTECTED] wrote:
if I show you guys how to do this:
echo sillyFunc()['a'] . PHP_EOL;
using a few brackets and things do you promise not to laugh?
*it's a bit weird*
id like to see it.
-nathan
Nathan Nobbe wrote:
On Thu, Feb 28, 2008 at 6:14 PM, Nathan Rixham [EMAIL PROTECTED] wrote:
if I show you guys how to do this:
echo sillyFunc()['a'] . PHP_EOL;
using a few brackets and things do you promise not to laugh?
*it's a bit weird*
id like to see it.
-nathan
don't say I didn't
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote:
don't say I didn't warn ya fellow nathan!
#!/usr/bin/php
?php
function sillyFunc() {
return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some
string');
}
echo !${~${''}='sillyFunc'}=${''}().${~${''}}['e'] . PHP_EOL;
I
Robert Cummings wrote:
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote:
don't say I didn't warn ya fellow nathan!
#!/usr/bin/php
?php
function sillyFunc() {
return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some
string');
}
echo
Robert Cummings wrote:
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote:
don't say I didn't warn ya fellow nathan!
#!/usr/bin/php
?php
function sillyFunc() {
return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some
string');
}
echo
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:
Robert Cummings wrote:
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote:
don't say I didn't warn ya fellow nathan!
#!/usr/bin/php
?php
function sillyFunc() {
return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some
On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote:
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:
Robert Cummings wrote:
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote:
don't say I didn't warn ya fellow nathan!
#!/usr/bin/php
?php
function sillyFunc()
Robert Cummings wrote:
On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote:
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:
Robert Cummings wrote:
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote:
don't say I didn't warn ya fellow nathan!
#!/usr/bin/php
?php
function
On Fri, 2008-02-29 at 04:38 +, Nathan Rixham wrote:
Robert Cummings wrote:
On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote:
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:
Robert Cummings wrote:
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote:
don't say I
On Thu, Feb 28, 2008 at 8:38 PM, Nathan Rixham [EMAIL PROTECTED] wrote:
Robert Cummings wrote:
On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote:
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:
Robert Cummings wrote:
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham
On Thu, 2008-02-28 at 20:42 -0800, Casey wrote:
On Thu, Feb 28, 2008 at 8:38 PM, Nathan Rixham [EMAIL PROTECTED] wrote:
Robert Cummings wrote:
On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote:
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:
Robert Cummings wrote:
On Thu, Feb 28, 2008 at 8:42 PM, Casey [EMAIL PROTECTED] wrote:
On Thu, Feb 28, 2008 at 8:38 PM, Nathan Rixham [EMAIL PROTECTED] wrote:
Robert Cummings wrote:
On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote:
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:
Casey wrote:
I don't know why I'm continuing this... but for the truly crazy:
function w($t) {
$t = array('f' = '...');
return 't';
}
echo ${w($t)}['f'];
addictive isn't it!
casey, I truelly believe that's as short as it can
On Fri, 2008-02-29 at 05:34 +, Nathan Rixham wrote:
Casey wrote:
I don't know why I'm continuing this... but for the truly crazy:
function w($t) {
$t = array('f' = '...');
return 't';
}
echo ${w($t)}['f'];
addictive isn't it!
wow, im going to have to stare at some of those and play around with them as
soon as im half awake :)
of course i still like my solution ;) but im excited about the
experimentation and ideas that have been shared on this topic, very
interesting really!
-nathan
24 matches
Mail list logo