|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-09 06:14 UTC] stas@php.net
[2000-09-02 17:56 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Look at this code: function strhex($ni) { $ni=dechex($ni); while (strlen($ni)<2) $ni="0".$ni; return $ni; } $color=strhex($r).strhex($g).strhex($b); echo $color; it works fine if nothing else in a file :( I have one file using that code that's not working under PHP4, but works great under PHP3. (same server, different port) :((( so I tried $color=strhex($r); $color.=strhex($g); $color.=strhex($b); instead the last line and it worked fine. I could'nt find any error, so I thought this may be interesting 4 you (whether I know this error - if it is one - might be hard to find and the description is)... I also tracked that variables... the function calculates the correct value (e.g. "9b") every time, but the 3 values are not concated in the right way (its running in a loop, any second cicle all values are calculated correct, but I only get "9b9b" instead of "9b9b9b"; the other cicle everything is OK) PHP(4) is compiled using the standard settings with the latest apache stable (.12) and mysql.libs sorry for my english & stay tuned Lars