ID: 32719 User updated by: jason at amp-design dot net Reported By: jason at amp-design dot net Status: Open Bug Type: Scripting Engine problem Operating System: CentOS 3 PHP Version: 5CVS-2005-04-15 (dev) New Comment:
Sorry, for some reason the Expected result: ---------------- string(2) " Actual result: -------------- string(2) " stuff is all wrong..... string(2) "�^" Warning: String is not zero-terminated (ZZZZ�̏*�̏*ZZZZ) (source: /root/php/php5-200504121430/Zend/zend_variables.h:35) in /var/www/vhosts/martinco.com/httpdocs/phpinfo.php on line 2 is the result I get. I expect string(2) "en" Sorry about that Previous Comments: ------------------------------------------------------------------------ [2005-04-15 15:49:34] jason at amp-design dot net Description: ------------ strval() does not terminate strings with 0 / NULL characters. The direct return value for var_dump() is totally garbled. When this result is passed to another internal PHP function this returns random garabe that varies with each request. Reproduce code: --------------- <?php var_dump(strval ('en')); die(); ?> Expected result: ---------------- string(2) " Actual result: -------------- string(2) " ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32719&edit=1