Hi!
Whilst you are all thinking about this, how about ...
$value = (function(){return $x;})();
I tried implementing that but it's not straightforward because you need
to keep the result of first call while everything inside () is
calculated (which can be any number of expressions including
jvlad a écrit :
"Mathieu Suen" wrote in message
news:4af91f92.4000...@easyflirt.com...
Why isn't a mater of pushing the function call statement into a valuable
statement?
I guess something like this:
statement :
| value
| function_call;
value :
| valriable
| array_access
| method_send
| ..
"Mathieu Suen" wrote in message
news:4af91f92.4000...@easyflirt.com...
>
> Why isn't a mater of pushing the function call statement into a valuable
> statement?
>
> I guess something like this:
>
> statement :
> | value
> | function_call;
>
>
> value :
> | valriable
> | array_access
> | method_s
melfar a écrit :
Hey,
Yep, I think there might be some caveats to that change.
The original patch did not work on methods, so I've fixed that and also
made the return value an rvalue, so that you can't attempt to modify the
temporary value, the zend_check_writable_variable guard will yield an er
On 09.11.2009, at 18:46, jvlad wrote:
I have filed a bug (suggestion) at http://bugs.php.net/bug.php?id=50003
What do you think about enabling such a constructions in future
versions of
php?
On Nov 9, 2009, at 1:41 AM, David Zülke wrote:
It's already on the list for PHP6:
http://wiki.php.n
>>> I have filed a bug (suggestion) at http://bugs.php.net/bug.php?id=50003
>>> What do you think about enabling such a constructions in future
>>> versions of
>>> php?
>>On Nov 9, 2009, at 1:41 AM, David Zülke wrote:
>> It's already on the list for PHP6:
>>
>> http://wiki.php.net/summits/pdmnot
On 07.11.2009, at 12:42, melfar wrote:
Hello!
I have filed a bug (suggestion) at http://bugs.php.net/bug.php?id=50003
What do you think about enabling such a constructions in future
versions of
php?
On Nov 9, 2009, at 1:41 AM, David Zülke wrote:
It's already on the list for PHP6:
http:
It's already on the list for PHP6:
http://wiki.php.net/summits/pdmnotesmay09 (see Day 2, PHP 6, #13).
No need to discuss this further, I think. You might also want to have
that bug closed, it's redundant.
- David
On 07.11.2009, at 12:42, melfar wrote:
Hello!
I have filed a bug (suggest
>> If you care not to waste userland with new names, use namespaces,
>> that's the way intruduced by php, and it is not javascript after all.
>>
>>
>
> I'm so old school in my coding, I've not got my head around namespaces
> yet. I'm just old.
>
There is nothing really "new" in namespaces.
For exam
2009/11/8 jvlad :
>>>
>>>
>>
>> Whilst you are all thinking about this, how about ...
>>
>> $value = (function(){return $x;})();
>>
>> Being able to call an anonymous function inline would certainly be a
>> useful mechanism. Allowing calls without creating dummy user land vars
>> would be consisten
>>
>>
>
> Whilst you are all thinking about this, how about ...
>
> $value = (function(){return $x;})();
>
> Being able to call an anonymous function inline would certainly be a
> useful mechanism. Allowing calls without creating dummy user land vars
> would be consistent with func()[0].
>
If you
""melfar"" wrote in message
news:0f.f6.03668.ad206...@pb1.pair.com...
> Hey,
>
> Yep, I think there might be some caveats to that change.
> The original patch did not work on methods, so I've fixed that and also
> made the return value an rvalue, so that you can't attempt to modify the
> tempora
2009/11/7 melfar :
> Hey,
>
> Yep, I think there might be some caveats to that change.
> The original patch did not work on methods, so I've fixed that and also
> made the return value an rvalue, so that you can't attempt to modify the
> temporary value, the zend_check_writable_variable guard will
Hey,
Yep, I think there might be some caveats to that change.
The original patch did not work on methods, so I've fixed that and also
made the return value an rvalue, so that you can't attempt to modify the
temporary value, the zend_check_writable_variable guard will yield an error.
The updated p
Hi Melfar, from my point of view I am totally to make this a legal
call like in python or ruby java,
as I liked compact code I liked to avoid temp vars especially on a
read-only call, but it might require some effort there and the final
patch might be not so simple, anyway this is a community call,
Hello!
I have filed a bug (suggestion) at http://bugs.php.net/bug.php?id=50003
What do you think about enabling such a constructions in future versions of
php?
Br,
-melfar
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
16 matches
Mail list logo