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

Home » Imported messages » comp.lang.php » return value?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: return value? [message #170892 is a reply to message #170888] Sun, 05 December 2010 18:01 Go to previous messageGo to previous message
Allodoxaphobia is currently offline  Allodoxaphobia
Messages: 21
Registered: September 2010
Karma:
Junior Member
On Sun, 05 Dec 2010 15:13:42 +0100, Luuk wrote:
> On 05-12-10 15:00, Paul Fredlein wrote:
>>
>> I'm returning the variables to a C++ programme running on the client
>> machine, I'm just a bit confused with php.
>>
>> If I return "1234" then I'm returning a string of 4 chars - 4 bytes, but
>> if it's a short int then it's only 2 bytes. Seems wasteful to return
>> more than I need to do.
>>
>> Thanks,
>>
>> Paul
>>
>
> you also can convert this 1234 to hexadecimal,
> than you would have 3 bytes ('4D2') to return,
>
> Which seems to be the best of both world....

Or, convert to raw binary and return it in 1 1/2 bytes. :-)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: what better book ?
Next Topic: PHP/AJAX Problem
Goto Forum:
  

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

Current Time: Fri Nov 22 15:57:53 GMT 2024

Total time taken to generate the page: 0.03867 seconds