Am 19.02.2020 um 15:52 schrieb Côme Chilliet 
<come.chill...@fusiondirectory.org>:
> Le mardi 18 février 2020, 20:27:37 CET Rowan Tommins a écrit :
>> With booleans, there is at least a consistency between those two 
>> operators, even though it's consistently weird. There's definitely a 
>> strong case for making them match +=1 and -=1 though.
> 
> Is there any reason the engine is not running the same code or even compiling 
> to the same opcodes $a++ and $a+=1?
> If it should never differ, why is it not the same operation?

$a++ is magic, see example #1 at 
https://www.php.net/manual/en/language.operators.increment.php 

And no, this should not be changed as it would be a major BC.

- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to