Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Yasuo Ohgaki
Hi Sara, 2013/7/20 Sara Golemon > > What's undefined isn't the relationship between preinc/postinc and add. What's undefined is the use of multiple preinc/postinc operators within a single expression (preincrements in particular). Our parser grammer, as it currently stands, does have a predicta

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sherif Ramadan
On Sat, Jul 20, 2013 at 1:33 AM, Sara Golemon wrote: > Your example "-$a * $a" isn't at all the same because -$a doesn't produce > side-effects, only output. > It doesn't have side effects. This is true. So I retract my argument there. > > I never said that the compiler might magically produce

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Adam Harvey
(Piggy-backing on Sara's e-mail, although this is more a response to Sherif and Yasuo.) On 19 July 2013 22:33, Sara Golemon wrote: > I never said that the compiler might magically produce differing results > for the same input. I said that the language's definition does not declare > a defined b

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sara Golemon
Your example "-$a * $a" isn't at all the same because -$a doesn't produce side-effects, only output. I never said that the compiler might magically produce differing results for the same input. I said that the language's definition does not declare a defined behavior for such expressions with com

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Leigh
I'm disappointed $a+$a doesn't work as expected :( On 20 July 2013 06:08, Sherif Ramadan wrote: > Sara, > > On Sat, Jul 20, 2013 at 12:44 AM, Sara Golemon wrote: > > > What's undefined isn't the relationship between preinc/postinc and add. > > What's undefined is the use of multiple prein

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sherif Ramadan
Sara, On Sat, Jul 20, 2013 at 12:44 AM, Sara Golemon wrote: > What's undefined isn't the relationship between preinc/postinc and add. > What's undefined is the use of multiple preinc/postinc operators within a > single expression > I'm sorry but I can not find any evidence of how that is undef

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Sara Golemon
The danger I see there is the fact that we'd have two different implementations of the same functionality (leading to potential code-rot), and worse, it wouldn't be obvious from userspace when one implementation would be used over the other. (We'd know, but I mean for the average PHP user, leading

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sara Golemon
What's undefined isn't the relationship between preinc/postinc and add. What's undefined is the use of multiple preinc/postinc operators within a single expression (preincrements in particular). Our parser grammer, as it currently stands, does have a predictable order, but that is a side-effect o

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Yasuo Ohgaki
Hi Sara, 2013/7/20 Sara Golemon > On Fri, Jul 19, 2013 at 7:16 PM, Yasuo Ohgaki wrote: > >> >> >> If there aren't comments, I'll rewrite the example. >> >> >> There were comments. I explicitly told you that that the behavior is > defined as undefined. You CHOSE to ignore that comment. You CH

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Ryan McCue
Sara Golemon wrote: > Well, now... to be fair... You could make them functions and use the same > parser trick the backtick operator uses. to map the non-parenthesized > versions feels messy though. I'd just hate to get stuck with a hacky > workaround like that for the long term. That's what

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Levi Morrison
On Fri, Jul 19, 2013 at 9:56 PM, Sara Golemon wrote: > On Fri, Jul 19, 2013 at 7:16 PM, Yasuo Ohgaki wrote: > > > > > > > If there aren't comments, I'll rewrite the example. > > > > > > There were comments. I explicitly told you that that the behavior is > defined as undefined. You CHOSE to ig

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sherif Ramadan
On Fri, Jul 19, 2013 at 11:56 PM, Sara Golemon wrote: > On Fri, Jul 19, 2013 at 7:16 PM, Yasuo Ohgaki wrote: > >> >> >> If there aren't comments, I'll rewrite the example. >> >> >> There were comments. I explicitly told you that that the behavior is > defined as undefined. You CHOSE to ignore

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Sara Golemon
Well, now... to be fair... You could make them functions and use the same parser trick the backtick operator uses. to map the non-parenthesized versions feels messy though. I'd just hate to get stuck with a hacky workaround like that for the long term. On Fri, Jul 19, 2013 at 9:23 PM, Sara G

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Sara Golemon
Lack of parenthesis and the fact that EVERY project out there takes advantage of this affordance. So BC *nightmare*. On Fri, Jul 19, 2013 at 9:16 PM, Ryan McCue wrote: > Johannes Schlüter wrote: > > So, unfortunately no, language constructs have different semantics which > > we can't emulate in

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Ryan McCue
Johannes Schlüter wrote: > So, unfortunately no, language constructs have different semantics which > we can't emulate inside function semantics (well ok, it is software, so > it is thinkable .. but nobody,yet, came up with a robust patch which > doesn't cause maintenance *and* performance penalty)

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Sara Golemon
I think the idea comes from a good place, but the actual, practical usefulness of it is so low that the availability of workaround negates even the very small amount of effort it would take to create (and maintain!) shadow functions for the language constructs. array_filter($arr, function($val) {

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sara Golemon
On Fri, Jul 19, 2013 at 7:16 PM, Yasuo Ohgaki wrote: > > > If there aren't comments, I'll rewrite the example. > > > There were comments. I explicitly told you that that the behavior is defined as undefined. You CHOSE to ignore that comment. You CHOSE to break the documentation.

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Tjerk Anne Meesters
On Sat, Jul 20, 2013 at 1:32 AM, Arpad Ray wrote: > On Fri, Jul 19, 2013 at 6:28 PM, Daniel Lowrey wrote: > > > While it works, it somewhat obscures what you're trying to accomplish in > > the code. The maintainability nightmare alone may be enough to > > counterbalance any benefits. Then again,

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Yasuo Ohgaki
Hi Sherif, I changed the example as follows. Thank you for your comment. [yohgaki@dev en]$ svn diff Index: language/operators.xml === --- language/operators.xml (リビジョン 330982) +++ language/operators.xml (作業コピー) @@ -225,15 +225,16 @@

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sherif Ramadan
On Fri, Jul 19, 2013 at 10:36 PM, Yasuo Ohgaki wrote: > Hi Sheif, > > 2013/7/20 Sherif Ramadan > >> Then I would say that example is wrong, but people may find reason to >> disagree. I'm basing my contention purely off what I see in php-src and the >> documented behavior for those operators. To

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Yasuo Ohgaki
Hi Sheif, 2013/7/20 Sherif Ramadan > Then I would say that example is wrong, but people may find reason to > disagree. I'm basing my contention purely off what I see in php-src and the > documented behavior for those operators. To me I see no reason why this > behavior would be considered undefi

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Jan Ehrhardt in php.internals (Sat, 20 Jul 2013 03:12:19 +0200): >As far as I remember from earlier today, VC10 stumbled over the same >unresolved externals. I will check that and will only report it if VC10 >does not stumble. VC10 did not stumble over ICU51. The next logical question was: what ha

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sherif Ramadan
On Fri, Jul 19, 2013 at 10:16 PM, Yasuo Ohgaki wrote: > Hi Sherif, > > Thank you for your info! > > 2013/7/20 Sherif Ramadan > >> I don't see where there is a bug in the documentation, no. > > > It is in doc's example code. > > Then I would say that example is wrong, but people may find reason

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Yasuo Ohgaki
Hi Sherif, Thank you for your info! 2013/7/20 Sherif Ramadan > I don't see where there is a bug in the documentation, no. It is in doc's example code. -- // mixing ++ and + produces undefined behavior $a = 1; echo ++$a + $a++; // may print 4 or 5 -- http://www.php.net/manual/en/langu

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sherif Ramadan
On Fri, Jul 19, 2013 at 8:55 PM, Yasuo Ohgaki wrote: > Hi Sara, > > 2013/7/20 Sara Golemon > > > I would ask that you don't "fix" the docs, as we want to continue to > > discourage users from engaging in unsafe behaviors. > > > If precedence is implemented correctly, there should not be any ambi

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Gustavo Lopes in php.internals (Sat, 20 Jul 2013 01:36:04 +0200): >I doubt it. I built the PECL/intl binaries in >http://pecl.php.net/package/intl with ICU 51 with no problem and the >codebase is very similar to that of ext/intl. But if you did find a bug, >please report it. Earlier today I com

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Yasuo Ohgaki
Hi Sara, 2013/7/20 Sara Golemon > I would ask that you don't "fix" the docs, as we want to continue to > discourage users from engaging in unsafe behaviors. If precedence is implemented correctly, there should not be any ambiguity. If precedence is not implemented correctly, I suppose it is a

Re: [PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Sara Golemon
If run right now, it will always produce the same value (4), but it isn't *defined* to do so. What that means is that behavior is subject to change without notice, warning, or justification. This is a somewhat harsh way of saying "Don't write expressions with ambiguous evaluations, that's clowny."

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Gustavo Lopes in php.internals (Sat, 20 Jul 2013 01:36:04 +0200): >On 19-07-2013 23:25, Jan Ehrhardt wrote: >> >> Sometimes you run into weird things. Today I learned that upgrading to >> ICU51 works perfectly under x64, but x86 stumbles over it and fails to >> compile php_intl.dll. No wonder the o

[PHP-DEV] Operator precedence is undefined?

2013-07-19 Thread Yasuo Ohgaki
Hi all, Take a look at this bug report. https://bugs.php.net/bug.php?id=65087 He complains about documentation of ++/--. The doc says http://www.php.net/manual/en/language.operators.precedence.php --- // mixing ++ and + produces undefined behavior $a = 1; echo ++$a + $a++; // may pr

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Gustavo Lopes
On 19-07-2013 23:25, Jan Ehrhardt wrote: Sometimes you run into weird things. Today I learned that upgrading to ICU51 works perfectly under x64, but x86 stumbles over it and fails to compile php_intl.dll. No wonder the official builds still stick to 50.1.2. I doubt it. I built the PECL/intl b

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Jan Ehrhardt in php.internals (Fri, 19 Jul 2013 22:42:14 +0200): >>> Are you using Update 2 of VC11? >>> http://blogs.msdn.com/b/somasegar/archive/2013/04/04/visual-studio-2012-update-2-now-available.aspx > >This question was a general question. The first 5.5 RC's were made >public before Update 2

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Johannes Schlüter in php.internals (Fri, 19 Jul 2013 22:57:26 +0200): >I think it is good if more people do this. (Same for *BSD, HP-UX, AiX, >Solaris, ...) Sometimes you run into weird things. Today I learned that upgrading to ICU51 works perfectly under x64, but x86 stumbles over it and fails to

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
"Anatol Belski" in php.internals (Fri, 19 Jul 2013 16:05:11 +0200): >Using bins from http://windows.php.net/downloads/php-sdk/ The 1999 version of bison.exe is still alive and kicking in http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110512.zip ... No chance that any normal Windo

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Johannes Schlüter
On Fri, 2013-07-19 at 22:42 +0200, Jan Ehrhardt wrote: > It would be really handy if there were phpize-configure-nmake packages > for Windows releases as well. Well,the ones from the snapshots should work nicely. I hope snaps use similar compilation settings to releases. > Pierre recently asked

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Yasuo Ohgaki
Hi Nikita, 2013/7/19 Nikita Popov > I don't think we should add string decrementing due to the rather complex > logic behind it (imho the string incrementing that we have shouldn't be > there either). > Right. It is impossible to symmetric operation ++/-- for strings. Not implementing --'STRING

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Johannes Schlüter in php.internals (Fri, 19 Jul 2013 15:33:55 +0200): >On http://windows.php.net/snapshots/ we provide development packages >which allow a phpize-configure-nmake workflow similar to the Unix system >without building the whole of PHP. Last time I tried this worked nicely. >I do not k

Re: [PHP-DEV] Pull requests report (17/7/2013)

2013-07-19 Thread Yasuo Ohgaki
Hi Jakub, 2013/7/20 Jakub Zelenka > Hi, please can you close the pull request > https://github.com/php/php-src/pull/317 . It's my old request for > array_column bug that has been already fixed. Cheers. > Closed. Thank you. -- Yasuo Ohgaki yohg...@ohgaki.net

Re: [PHP-DEV] Compatibility changes for 5.5

2013-07-19 Thread Stas Malyshev
Hi! > Understood. But given for the entire 5 series it was valid I feel people > finding their code randomly breaking now would expect to see it in the > documentation somewhere. It is still valid, and still works the same, just produces notice. -- Stanislav Malyshev, Software Architect SugarCR

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
"Anatol Belski" in php.internals (Fri, 19 Jul 2013 16:05:11 +0200): >Using bins from http://windows.php.net/downloads/php-sdk/ There is no doubt that I have used this before, given the fact that other files like the phpsdk_buildtree.bat were also in my deps dir. But I must have used it before 15 s

Re: [PHP-DEV] Compatibility changes for 5.5

2013-07-19 Thread Martin Amps
Understood. But given for the entire 5 series it was valid I feel people finding their code randomly breaking now would expect to see it in the documentation somewhere. Where would you suggest we place it? Given it’s a bug fix, would it still fit here? http://www.php.net/manual/en/migration55.

Re: [PHP-DEV] Pull requests report (17/7/2013)

2013-07-19 Thread Jakub Zelenka
Hi, please can you close the pull request https://github.com/php/php-src/pull/317 . It's my old request for array_column bug that has been already fixed. Cheers. Jakub On Thu, Jul 18, 2013 at 11:04 PM, Yasuo Ohgaki wrote: > Hi Levi, > > 2013/7/19 Levi Morrison > > > Why don't we state this fa

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Johannes Schlüter
Hi, On Fri, 2013-07-19 at 12:36 -0400, Daniel Lowrey wrote: > I have a simple question about the callability of language constructs and > whether or not that's something that might change in the future. Consider: > > var_dump(is_callable('echo')); // bool(false) > var_dump(call_user_func('echo',

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Arpad Ray
On Fri, Jul 19, 2013 at 6:28 PM, Daniel Lowrey wrote: > While it works, it somewhat obscures what you're trying to accomplish in > the code. The maintainability nightmare alone may be enough to > counterbalance any benefits. Then again, who needs > readability/maintainability when you can write h

[PHP-DEV] [RFC] Importing namespaced functions

2013-07-19 Thread Igor Wiedler
Hello internals, I posted the initial idea for a use_function RFC a few months back. I would like to make the proposal official now, and open it for discussion. I also did some work on a patch that probably still has some issues. Review on that is welcome as well. RFC: https://wiki.php.net/rfc

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Daniel Lowrey
It would more than likely create some semantic nightmares. I can envision people doing numpty things like: array_map('include', $dependencyFilesArr); While it works, it somewhat obscures what you're trying to accomplish in the code. The maintainability nightmare alone may be enough to counterbala

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Arpad Ray
On Fri, Jul 19, 2013 at 5:36 PM, Daniel Lowrey wrote: > How deeply ingrained into the engine is this behavior? Is there any chance > of language constructs ever passing the tests for callability or is that > just a pipe dream that's not worth the implementation effort? > It's actually pretty tri

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Daniel Lowrey
> Oh yeah, I see your point about is_null but not why it makes any more sense to allow language constructs there. Yeah I don't know if it even does. I'm not even really sure if there's a good example use case for it besides the array_filter/isset combo. My question was really only exploratory in n

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Peter Cowburn
On 19 July 2013 18:11, Jelle Zijlstra wrote: > > > > 2013/7/19 Peter Cowburn > >> On 19 July 2013 17:36, Daniel Lowrey wrote: >> >> > I have a simple question about the callability of language constructs >> and >> > whether or not that's something that might change in the future. >> Consider: >

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Daniel Lowrey
> array_filter([…], 'is_null'); Doesn't work -- `is_null` would return TRUE leaving a result of [NULL] after the array_filter operation. That's the diametric opposite of what my example code looks to do. On Fri, Jul 19, 2013 at 1:07 PM, Peter Cowburn wrote: > > > > On 19 July 2013 17:36, Daniel

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Jelle Zijlstra
2013/7/19 Peter Cowburn > On 19 July 2013 17:36, Daniel Lowrey wrote: > > > I have a simple question about the callability of language constructs and > > whether or not that's something that might change in the future. > Consider: > > > > var_dump(is_callable('echo')); // bool(false) > > var_dum

Re: [PHP-DEV] Language constructs and callability

2013-07-19 Thread Peter Cowburn
On 19 July 2013 17:36, Daniel Lowrey wrote: > I have a simple question about the callability of language constructs and > whether or not that's something that might change in the future. Consider: > > var_dump(is_callable('echo')); // bool(false) > var_dump(call_user_func('echo', 'foo')); // E_WA

[PHP-DEV] Language constructs and callability

2013-07-19 Thread Daniel Lowrey
I have a simple question about the callability of language constructs and whether or not that's something that might change in the future. Consider: var_dump(is_callable('echo')); // bool(false) var_dump(call_user_func('echo', 'foo')); // E_WARNING echo('foo'); // foo var_dump(is_callable('isset'

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Ralf Lang
What's the intended use case for string increment / decrement? >>> Personally, I instantly think of mirroring spreadsheet columns - works >>> quite well in that context. >>> >> >> ++/-- 'XYZ1234' would have use cases. I once had an app which needed to generate long continuous ra

Re: [PHP-DEV] SPL Binary Tree, Graph

2013-07-19 Thread Levi Morrison
> I would like to ask you what is your opinion about implementing Binary >>> Tree >>> and Graph data structures in SPL in addition to existing ones? IMHO it >>> would be great because that will prevent from inventing a wheel all the >>> time, and prove that PHP is full featured language like C#, J

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Anatol Belski
On Fri, July 19, 2013 14:17, Jan Ehrhardt wrote: > Jan Ehrhardt in php.internals (Fri, 19 Jul 2013 14:03:51 +0200): > >> http://windows.php.net/downloads/releases/php-5.5.1-src.zip does not >> contain a zend_language_parser.c. The php-5.5.1.tar.xz does... >> > > http://windows.php.net/downloads/rel

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Johannes Schlüter
On Fri, 2013-07-19 at 14:50 +0200, Jan Ehrhardt wrote: > Normal users do not generally build PHP, but there is a chance they use > a build system for compiling special extensions, Then it would be nice > if the zips contain the pregenerated parses. On http://windows.php.net/snapshots/ we provide d

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Johannes Schlüter in php.internals (Fri, 19 Jul 2013 14:20:21 +0200): >On Fri, 2013-07-19 at 14:03 +0200, Jan Ehrhardt wrote: >> Johannes Schlüter in php.internals (Fri, 19 Jul 2013 13:31:25 +0200): >> >Release tarballs should have pregenerated parses so this step shouldn't >> >be needed .. >> >>

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Jan Ehrhardt in php.internals (Fri, 19 Jul 2013 14:03:51 +0200): >http://windows.php.net/downloads/releases/php-5.5.1-src.zip does not >contain a zend_language_parser.c. >The php-5.5.1.tar.xz does... http://windows.php.net/downloads/releases/archives/php-5.5.0-src.zip did not contain a zend_langua

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Johannes Schlüter
On Fri, 2013-07-19 at 14:03 +0200, Jan Ehrhardt wrote: > Johannes Schlüter in php.internals (Fri, 19 Jul 2013 13:31:25 +0200): > >On Fri, 2013-07-19 at 12:44 +0200, Jan Ehrhardt wrote: > >> C:\php-sdk\php55dev>nmake snap > >[..] > >> bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Johannes Schlüter in php.internals (Fri, 19 Jul 2013 13:31:25 +0200): >On Fri, 2013-07-19 at 12:44 +0200, Jan Ehrhardt wrote: >> C:\php-sdk\php55dev>nmake snap >[..] >> bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_ >> Zend/zend_ini_parser.y >> bison.exe --output=Zend/zend

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Johannes Schlüter
On Fri, 2013-07-19 at 12:44 +0200, Jan Ehrhardt wrote: > C:\php-sdk\php55dev>nmake snap [..] > bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_ > Zend/zend_ini_parser.y > bison.exe --output=Zend/zend_language_parser.c -v -d -p zend > Zend/zend_language_parser.y > zend/zend_

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Anatol Belski
Hi Jan, I've just tried to make a snapshot build and it's worked. Please give the exact way you do it from the start. Regards Anatol On Fri, July 19, 2013 12:44, Jan Ehrhardt wrote: > Julien Pauli in php.internals (Fri, 19 Jul 2013 10:26:54 +0200): > >> We just released PHP 5.5.1. This release

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Peter Lind
On 19 July 2013 12:34, Yasuo Ohgaki wrote: > Hi, > > 2013/7/19 Peter Lind > >> On 19 July 2013 11:18, Dan Cryer wrote: >> >>> What's the intended use case for string increment / decrement? >>> >>> >> Personally, I instantly think of mirroring spreadsheet columns - works >> quite well in that co

[PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Jan Ehrhardt
Julien Pauli in php.internals (Fri, 19 Jul 2013 10:26:54 +0200): >We just released PHP 5.5.1. This release includes bug fixes as well as a >security fix. When I try to build this one Windows, it fails quite rapidly. How do I solve that? Jan C:\php-sdk\php55dev>nmake snap Microsoft (R) Program M

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Nikita Popov
On Thu, Jul 18, 2013 at 3:46 PM, Chris London wrote: > My friend shared some code with me today that wasn't working for him. He > was incrementing letters like this: > > $letter = 'A'; > echo ++$letter; // Output: B > > He was then trying to decrement letters like this: > > $letter = 'B'; > echo

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Yasuo Ohgaki
Hi, 2013/7/19 Peter Lind > On 19 July 2013 11:18, Dan Cryer wrote: > >> What's the intended use case for string increment / decrement? >> >> > Personally, I instantly think of mirroring spreadsheet columns - works > quite well in that context. > ++/-- 'XYZ1234' would have use cases. > >

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Peter Lind
On 19 July 2013 11:18, Dan Cryer wrote: > What's the intended use case for string increment / decrement? > > Personally, I instantly think of mirroring spreadsheet columns - works quite well in that context. > It just seems like madness to me, using mathematical operators with > strings, produc

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Xinchen Hui
On Fri, Jul 19, 2013 at 5:18 PM, Dan Cryer wrote: > What's the intended use case for string increment / decrement? > + 1 could we please stop wasting time on such issues? many thanks > It just seems like madness to me, using mathematical operators with > strings, producing seemingly arbitrary

Re: [PHP-DEV] SPL Binary Tree, Graph

2013-07-19 Thread Богдан Кузема
Hello Levi, Your statement is fair enough. Use cases I can think about are social, network, geographical, connected flights graphs, work with hierarchical data like corporations structures, products categories, indexing objects tree stored in memory/cache and PHP web applications representing tho

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Dan Cryer
What's the intended use case for string increment / decrement? It just seems like madness to me, using mathematical operators with strings, producing seemingly arbitrary results in some circumstances (C -> B -> A -> NULL / False ?). Also what happens in other languages? Take for example German, i

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Yasuo Ohgaki
Hi, I take a look at the code. It does support [0-9] also. [yohgaki@dev tests]$ php -r "\$a = ' a10';for (\$i=0; \$i<10;\$i++) var_dump(++\$a);" string(4) " a11" string(4) " a12" string(4) " a13" string(4) " a14" string(4) " a15" string(4) " a16" string(4) " a17" string(4) " a18" string(4) " a19"

Re: [PHP-DEV] PHP 5.5.1 released

2013-07-19 Thread Ivan Enderlin @ Hoa
Congrats :-). On 19/07/13 10:26, Julien Pauli wrote: Hi internals, We just released PHP 5.5.1. This release includes bug fixes as well as a security fix. For changes in PHP 5.5.1, please consult the PHP 5 ChangeLog. Release Announcement: http://www.php.net/release_5_5_1.php

[PHP-DEV] PHP 5.5.1 released

2013-07-19 Thread Julien Pauli
Hi internals, We just released PHP 5.5.1. This release includes bug fixes as well as a security fix. For changes in PHP 5.5.1, please consult the PHP 5 ChangeLog. Release Announcement: http://www.php.net/release_5_5_1.php Downloads:http://www.php.

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Peter Lind
Interesting to note that although Perl 6 is apparently capable of decrementing strings, it doesn't fully mirror the incrementing: http://feather.perl6.nl/syn/S03.html#line_516 Specifically: decrementing 'AAA' would not turn into 'ZZ' but would error, according to that link -- WWW: plphp.dk / p

Re: [PHP-DEV] Feature Proposal: Allow letter decrementing

2013-07-19 Thread Yasuo Ohgaki
Hi, 2013/7/19 Mateusz Kocielski > > see http://www.php.net/manual/en/language.operators.increment.php > > I don't see any explanation for the examples above. Documentation says: > > [...] For example, in PHP and Perl $a = 'Z'; $a++; turns $a into 'AA' [...] > > I'd expect " ZZ" to become " AAA"