RE: [PHP] get size of variable n bytes
| From: | Petre Agenbag | Date: | Wed, 16 Jul 2003 15:34:49 +0000 |
| Subject: | RE: [PHP] get size of variable n bytes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155447@lists.php.net to get a copy of this message | ||
Yes, well, that complicates things.
You see, I'm trying to determine the size that the $_POST variable will be
in bytes, because there is a byte limit in the php.ini file for POST
variable size, so I was hoping for something easy like bytes_size($_POST)...
Would also be handy to calculate how much memory your script will use/need.
So, you say there is no such function or no way to determine it?
-----Original Message-----
From: David Nicholson [mailto:me@djnicholson.com]
Sent: Wednesday, July 16, 2003 4:36 PM
To: php-general@lists.php.net
Subject: Re: [PHP] get size of variable n bytes
Hello,
This is a reply to an e-mail that you wrote on Wed, 16 Jul 2003 at 15:31,
lines prefixed by '>' were originally written by you.
> One way would be to assume that 1 character takes 1 byte to store
> so...
> $sizeinbytes = strlen($field);
Also, this will only work with text data as numbers types, bool types etc
will be stored differently.
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php