# Bug 52355

- Thread: https://externals.io/message/67942
- Original archive: https://news-web.php.net/php.internals/67942
- Started by Florin Patan on 2013-06-27T12:42:20+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #67942 — Florin Patan — 2013-06-27T12:42:20+00:00

URL: https://externals.io/message/67942#67942

Hello,


I'd like to start working on a bug,
https://bugs.php.net/bug.php?id=52355 but I'm not sure where to start
investigating exactly.
I've compared the 5.2.2 and 5.2.3 changes and there's nothing that
jumps into my eyes.
Could I get some pointers on how to start working on debugging this
and how to eventually fix it?
Also, while I'll fix this I plan to write an article about starting
from scratch and document every step in order to identify where the
bug is located and how to test/fix it so that others could use this
information.
Thanks.


Best regards
----
Florin Patan
https://github.com/dlsniper
http://www.linkedin.com/in/florinpatan

---

## #67944 — Tjerk Anne Meesters — 2013-06-27T12:55:35+00:00

URL: https://externals.io/message/67942#67944 · In reply to: #67942

> Hello,
>
>
> I'd like to start working on a bug,
> https://bugs.php.net/bug.php?id=52355 but I'm not sure where to start
> investigating exactly.
>

First of all, the effort is much appreciated :)

I've run a small test case and it seems the behaviour has been consistent
throughout most of PHP 4 and all of PHP 5: http://3v4l.org/8Q2F5



> I've compared the 5.2.2 and 5.2.3 changes and there's nothing that
> jumps into my eyes.
> Could I get some pointers on how to start working on debugging this
> and how to eventually fix it?
> Also, while I'll fix this I plan to write an article about starting
> from scratch and document every step in order to identify where the
> bug is located and how to test/fix it so that others could use this
> information.
> Thanks.
>
>
> Best regards
> ----
> Florin Patan
> https://github.com/dlsniper
> http://www.linkedin.com/in/florinpatan
>
> --
> 
> 
>
>


-- 
--
Tjerk

---

## #67957 — Nikita Popov — 2013-06-27T15:08:45+00:00

URL: https://externals.io/message/67942#67957 · In reply to: #67942

> Hello,
>
>
> I'd like to start working on a bug,
> https://bugs.php.net/bug.php?id=52355 but I'm not sure where to start
> investigating exactly.
> I've compared the 5.2.2 and 5.2.3 changes and there's nothing that
> jumps into my eyes.
> Could I get some pointers on how to start working on debugging this
> and how to eventually fix it?
> Also, while I'll fix this I plan to write an article about starting
> from scratch and document every step in order to identify where the
> bug is located and how to test/fix it so that others could use this
> information.
> Thanks.
>

Here is the implementation of the unary minus operator:
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#776
As you can see -a is translated to 0 - a.

In this particular case -0 is translated to 0 - 0, which is 0, not -0.

Hope this helps,
Nikita
