|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-15 12:38 UTC] stas@php.net
[2000-08-15 12:38 UTC] joey@php.net
[2000-09-03 07:45 UTC] waldschrott@php.net
[2000-09-04 07:27 UTC] johnw at cogs dot susx dot ac dot uk
[2000-09-17 17:15 UTC] stas@php.net
[2000-09-17 17:40 UTC] johnw at cogs dot susx dot ac dot uk
[2000-09-20 01:35 UTC] stas@php.net
[2000-10-12 09:34 UTC] johnw at cogs dot susx dot ac dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 16:00:02 2025 UTC |
The following script: <? function add_query_string($url, $qs) { return "$url?$qs"; } function url_stem() { return add_query_string("test.php", "arg1=foo"); } function test() { for ($i=0; $i < 10; $i++) { $url=url_stem() . sprintf("&arg2=%s", urlencode("baz")); print("$i - $url<BR>\n"); } } test(); ?> fails on ALTERNATE times round the loop, i.e. it produces the output: 0 - test.php?arg1=foo&arg2=baz 1 - 2 - test.php?arg1=foo&arg2=baz 3 - 4 - test.php?arg1=foo&arg2=baz 5 - 6 - test.php?arg1=foo&arg2=baz 7 - 8 - test.php?arg1=foo&arg2=baz 9 - I've boiled this down as much as I can (which is why the code might look a bit silly). PHP is statically linked into Apache 1.3.4 running on a Sun Ultra 1.