# zend_atoi() compatibilty

- Thread: https://externals.io/message/11580
- Original archive: https://news-web.php.net/php.internals/11580
- Started by Curt Zirzow on 2004-07-27T03:02:24+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #11580 — Curt Zirzow — 2004-07-27T03:02:24+00:00

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

In light of bug#29306 (http://php.net/29306), I looked at zend_atoi
and found that it uses strtol which treats numbers prefixed with 0
as octal, according to my docs on BSD.  Can i get a confirmation
that this is standard strtol behaviour, so I can document it as
such?


Thanks!

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

---

## #11582 — Andi Gutmans — 2004-07-27T07:00:50+00:00

URL: https://externals.io/message/11580#11582 · In reply to: #11580

Yep it's intended.

At 03:02 AM 7/27/2004 +0000, Curt Zirzow wrote:

>In light of bug#29306 (http://php.net/29306), I looked at zend_atoi
>and found that it uses strtol which treats numbers prefixed with 0
>as octal, according to my docs on BSD.  Can i get a confirmation
>that this is standard strtol behaviour, so I can document it as
>such?
>
>
>Thanks!
>
>Curt
>--
>First, let me assure you that this is not one of those shady pyramid schemes
>you've been hearing about.  No, sir.  Our model is the trapezoid!
