php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29533 for($x=-11;$x++;$x<=10)
Submitted: 2004-08-05 12:48 UTC Modified: 2004-08-05 13:15 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: indrek at tavid dot ee Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.3.9 OS: windows 2000
Private report: No CVE-ID: None
 [2004-08-05 12:48 UTC] indrek at tavid dot ee
Description:
------------
for breaks when $x after variable value=0

Reproduce code:
---------------
<?php
for($x=-11;$x++;$x<=10){
	echo $x.'<br>';
}
?>

Expected result:
----------------
...
-5
-4
-3
-2
-1
0
1
2
3
4
...


Actual result:
--------------
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-05 12:50 UTC] indrek at tavid dot ee
and it's same withh php5
 [2004-08-05 12:53 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See http://php.net/for


 [2004-08-05 13:15 UTC] indrek at tavid dot ee
sorry, i realised too that i made a huge mistake, but please forgive me it's 27 degrees hot in here :).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 06:01:31 2024 UTC