php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18651 echo 09 echoes 0, echo 07 echoes 7
Submitted: 2002-07-30 10:42 UTC Modified: 2002-11-09 09:02 UTC
Votes:5
Avg. Score:3.8 ± 1.2
Reproduced:4 of 5 (80.0%)
Same Version:1 (25.0%)
Same OS:2 (50.0%)
From: thekid at thekid dot de Assigned: derick (profile)
Status: Wont fix Package: Variables related
PHP Version: 4.2.2 OS: FreeBSD 4.3
Private report: No CVE-ID: None
 [2002-07-30 10:42 UTC] thekid at thekid dot de
thekid@thekid:~ > echo '<?php echo 00; ?>' |php -q
0
thekid@thekid:~ > echo '<?php echo 01; ?>' |php -q
1
thekid@thekid:~ > echo '<?php echo 02; ?>' |php -q
2
thekid@thekid:~ > echo '<?php echo 03; ?>' |php -q
3
thekid@thekid:~ > echo '<?php echo 04; ?>' |php -q
4
thekid@thekid:~ > echo '<?php echo 05; ?>' |php -q
5
thekid@thekid:~ > echo '<?php echo 06; ?>' |php -q
6
thekid@thekid:~ > echo '<?php echo 07; ?>' |php -q
7
thekid@thekid:~ > echo '<?php echo 08; ?>' |php -q
0
thekid@thekid:~ > echo '<?php echo 09; ?>' |php -q
0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-30 10:44 UTC] thekid at thekid dot de
Sorry. Octal numbers. Just forget it!
 [2002-07-30 11:19 UTC] hannah at schlund dot de
Octal number input nonwithstanding, any parser should
reject invalid octal number literals, instead of
silently returning zero.

Octal numbers are 0[0-7]+, NOT 0[0-9]+.
 [2002-08-17 13:47 UTC] derick@php.net
Reopen, and assigning
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC