ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

64 bit int issue

Author Message
Fandratec



Joined: 07 Aug 2013
Posts: 10

PostPosted: Tue Oct 02, 2018 6:52 am    Post subject: 64 bit int issue Reply with quote

OS and PHP both are 64 bit, PHP Version 7.2.10.

Code:

<?php
   $val = 2500072158;
   var_dump($val);
?>


If this code is not encoded, result is:

int(2500072158)

If this code is encoded, result is:

float(2500072158)


Is it a encoder or loader bug ?
Back to top
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 355

PostPosted: Tue Oct 02, 2018 9:45 am    Post subject: Reply with quote

Hi,

This is due to the encoder using a 32-bit encoding format.

Since the Encoder is using at its core PHP's compilation process, integers greater than the 32-bit PHP_INT_MAX (2147483647) are converted to floats. Thus, even on a 64-bit system, you will get the result you have seen.
_________________
Alastair

ionCube
Back to top
View user's profile Send private message
Fandratec



Joined: 07 Aug 2013
Posts: 10

PostPosted: Tue Oct 02, 2018 11:45 am    Post subject: Reply with quote

I get it, thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum