Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in PHP only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
PHP
Get Variable Memory Size
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
sakthipro
New Member
Join Date:
May 2007
Posts:
18
#1
Get Variable Memory Size
May 11 '07, 08:10 PM
Hi,
is there any thing available to get the variable size?
ie.
$temp="Temp";
will result 4 bytes.
Purple
Recognized Expert
Contributor
Join Date:
May 2007
Posts:
404
#2
May 11 '07, 08:55 PM
Hi,
Would it be rude to ask what you are trying to achieve over and above the question as stated..
Rgds Purple
Comment
Post
Cancel
pbmods
Recognized Expert
Expert
Join Date:
Apr 2007
Posts:
5821
#3
May 11 '07, 11:46 PM
About the closest thing PHP has to that is var_dump.
PHP: var_dump - Manual
http://php.net/var_dump
Dumps information about a variable
Now I'm curious, too. Whatcha gettin' at?
Comment
Post
Cancel
Atli
Recognized Expert
Expert
Join Date:
Nov 2006
Posts:
5062
#4
May 12 '07, 12:17 AM
Originally posted by
pbmods
About the closest thing PHP has to that is var_dump.
PHP: var_dump - Manual
http://php.net/var_dump
Dumps information about a variable
Now I'm curious, too. Whatcha gettin' at?
Yea I've been looking for a way to do this all day and I haven't found anything.
What puzzles me even more is why would you need to do this?
Comment
Post
Cancel
code green
Recognized Expert
Top Contributor
Join Date:
Mar 2007
Posts:
1726
#5
May 14 '07, 11:50 AM
The only possible use in php that I can think of is for writing to files, if there is to be some size limitation. Of course the estimate would be wrong because of the different overhead created by different files.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment