Hi:
Call for voting about the const array/string derefernce RFC now.
you can find more info here: https://wiki.php.net/rfc/constdereference#vote
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.
Nikita
Hi:
Call for voting about the const array/string derefernce RFC now.you can find more info here: https://wiki.php.net/rfc/constdereference#vote
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
echo "foobar"["foo"][0];
"foobar"["foo"] - Why not "undefined index"?
On Tue, Dec 13, 2011 at 10:20 AM, Nikita Popov nikita.ppv@googlemail.comwrote:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.Nikita
Hi:
Call for voting about the const array/string derefernce RFC now.you can find more info here:
https://wiki.php.net/rfc/constdereference#votethanks
--
Laruence Xinchen Hui
http://www.laruence.com/
Hi all,
echo "foobar"["foo"][0];
"foobar"["foo"] - Why not "undefined index"?
Exactly. The index/key "foo" does not really exist in the string
"foobar" because a string is more an indexed array of characters than a
combination of substrings (as the key "foo" could suggest).
"foobar"[3] has a well-defined meaning, but "foobar"["foo"] sounds
strange for me :-). Which semantics do you attached to this syntax?
Cheers.
Ivan Enderlin
Developer of Hoa
http://hoa.42/ or http://hoa-project.net/
PhD. student at LIFC/DISC (Vesontio) and INRIA (Cassis)
http://lifc.univ-fcomte.fr/ and http://www.inria.fr/
Member of HTML and WebApps Working Group of W3C
http://w3.org/
Hi:
should consistent with :
<?php
$a = "string";
echo $a["foo"][0];
in 5.4.
thanks
echo "foobar"["foo"][0];
"foobar"["foo"] - Why not "undefined index"?
On Tue, Dec 13, 2011 at 10:20 AM, Nikita Popov nikita.ppv@googlemail.comwrote:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.Nikita
Hi:
Call for voting about the const array/string derefernce RFC now.you can find more info here:
https://wiki.php.net/rfc/constdereference#votethanks
--
Laruence Xinchen Hui
http://www.laruence.com/--
--
--
Laruence Xinchen Hui
http://www.laruence.com/
Hi:
thanks for pointing this out.
yes, maybe 5.4.1
thanks
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.Nikita
Hi:
Call for voting about the const array/string derefernce RFC now.you can find more info here: https://wiki.php.net/rfc/constdereference#vote
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/--
--
Laruence Xinchen Hui
http://www.laruence.com/
2011/12/13 Nikita Popov nikita.ppv@googlemail.com:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.
+1
@Laruence
Can you remove the voting widget?
2011/12/13 Nikita Popov nikita.ppv@googlemail.com:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.+1
@Laruence
Can you remove the voting widget?
I would reset the vote and make the vote for this change to apply to
trunk instead.
There is no reason to delay this decision, even if it is too late for 5.4 :)
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
2011/12/13 Nikita Popov nikita.ppv@googlemail.com:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.+1
@Laruence
Can you remove the voting widget?I would reset the vote and make the vote for this change to apply to
trunk instead.There is no reason to delay this decision, even if it is too late for 5.4 :)
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
only for trunk?
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
2011/12/13 Nikita Popov nikita.ppv@googlemail.com:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.+1
@Laruence
Can you remove the voting widget?I would reset the vote and make the vote for this change to apply to
trunk instead.There is no reason to delay this decision, even if it is too late for 5.4 :)
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Hi, done, now only voting for trunk :)
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
post again as a top thread with this point being clarified please :)
2011/12/13 Nikita Popov nikita.ppv@googlemail.com:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.+1
@Laruence
Can you remove the voting widget?I would reset the vote and make the vote for this change to apply to
trunk instead.There is no reason to delay this decision, even if it is too late for 5.4 :)
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Hi, done, now only voting for trunk :)
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Hi:
I have reset the vote, only vote for trunk now.
https://wiki.php.net/rfc/constdereference
thanks
post again as a top thread with this point being clarified please :)
2011/12/13 Nikita Popov nikita.ppv@googlemail.com:
This can't go into PHP 5.4.0 in any case, because it is a feature
addition and the release is already in RC.+1
@Laruence
Can you remove the voting widget?I would reset the vote and make the vote for this change to apply to
trunk instead.There is no reason to delay this decision, even if it is too late for 5.4 :)
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Hi, done, now only voting for trunk :)
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/--
Pierre@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
--
Laruence Xinchen Hui
http://www.laruence.com/
> Hi:
> I have reset the vote, only vote for trunk now.
>
> https://wiki.php.net/rfc/constdereference
>
What happens in your patch if something like ['foo', 'bar'][1] is used
in write context?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Hi!
Hi:
I have reset the vote, only vote for trunk now.What happens in your patch if something like ['foo', 'bar'][1] is used in
write context?
this patch will not allow that, in write context lead to syntax error.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227--
--
Laruence Xinchen Hui
http://www.laruence.com/
Call for voting about the const array/string derefernce RFC now.
you can find more info here:
https://wiki.php.net/rfc/constdereference#vote
I have always wondered why array dereference does not just work on
arbitrary expressions in PHP like other operators do. Even with the
latest modification that allows dereferencing function calls, this works:
md5('')[0]
but this results in a parse error (syntax error, unexpected '['):
(md5(''))[0]
Then there are expressions like ('a'.'b')[0], all sorts of combinations
of operators... Why not just treat any 'expression[expression]' as an
array dereference as other languages do?
echo "foobar"["foo"][0];
"foobar"["foo"] - Why not "undefined index"?
"foo" is converted to an integer, yielding zero. 'Undefined index' seems
to make more sense to me but PHP 5.3 behaves the same way.
--
Oleg