php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67211 operator --
Submitted: 2014-05-06 07:10 UTC Modified: 2014-05-06 08:26 UTC
From: dark9 at rune dot ws Assigned:
Status: Suspended Package: Variables related
PHP Version: 5.5.12 OS: osx 10.9.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-05-06 07:10 UTC] dark9 at rune dot ws
Description:
------------
run $a-=1;
result is $a=-1;
this is ok.


but run $a--;
result is $a=null;

but expected result should be $a=-1;

Test script:
---------------
<?php
$a--;
var_dump($a);


Expected result:
----------------
int(-1)

Actual result:
--------------
NULL

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-06 08:26 UTC] requinix@php.net
-Status: Open +Status: Suspended
 [2014-05-06 08:26 UTC] requinix@php.net
I'll go out on a limb and mark this as "suspended", pending an RFC:
https://wiki.php.net/rfc/normalize_inc_dec
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 12:01:29 2024 UTC