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 #170887 is a reply to message #170878] Sun, 05 December 2010 14:00 Go to previous messageGo to previous message
paulfredlein is currently offline  paulfredlein
Messages: 8
Registered: December 2010
Karma:
Junior Member
Hi,

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


Thomas 'PointedEars' Lahn <PointedEars(at)web(dot)de> wrote:

> Paul Fredlein wrote:
>
>> Basic newbie question:-
>>
>> $value = "0";
>> return $value;
>>
>> I assume that would return a string (or in this case one char with the
>> hex value of 30) - is that right?
>>
>> $value = 0;
>> return $value;
>>
>> What does this return? Is it a string, a short int (little endian or big
>> endian) or what?
>
> Yes and yes. (Try the gettype() function, or var_dump()).
>
>
> PointedEars
[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: Mon Oct 21 09:23:08 GMT 2024

Total time taken to generate the page: 0.07520 seconds