FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP 5.3.9 hex bug?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP 5.3.9 hex bug? [message #177006 is a reply to message #177002] Wed, 15 February 2012 17:48 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 15/02/2012 16:12, aaa escribió/wrote:
> Why is this:
> fseek($f, 0x0000+2, SEEK_SET);
> giving same result as:
> fseek($f, 4, SEEK_SET);
> and not same result as:
> fseek($f, 0000+2, SEEK_SET);
> or
> fseek($f, 2, SEEK_SET);
> ?
> What is wrong with the hex notation?

It's really funny:

var_dump(0x0 + 2, 0x0+ 2, 0x0+2, 0x0 +2);

.... prints:

int(2)
int(2)
int(4)
int(4)

No idea of what's going on but it only seems to affect hexadecimal zero
so at least there's an obvious workaround.


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: session array not available in popup?
Next Topic: website management
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 07:42:01 GMT 2024

Total time taken to generate the page: 0.03915 seconds