#47169 [Bgs]: cast, gettype
| From: | lunter at interia dot pl | Date: | Tue, 20 Jan 2009 15:46:55 +0000 |
| Subject: | #47169 [Bgs]: cast, gettype | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133071@lists.php.net to get a copy of this message | ||
ID: 47169
User updated by: lunter at interia dot pl
Reported By: lunter at interia dot pl
Status: Bogus
Bug Type: Unicode Engine related
Operating System: all
PHP Version: 6CVS-2009-01-20 (snap)
New Comment:
This not a bug, this if feature request.
Previous Comments:
------------------------------------------------------------------------
[2009-01-20 15:04:36] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2009-01-20 14:57:01] lunter at interia dot pl
Description:
------------
total mishmash with casting and gettype
Reproduce code:
---------------
<?
$v=(string)'';
print('1. variable casted as string has type: '.gettype($v).'<br>');
$v=(unicode)'';
print('2. variable casted as unicode has type: '.gettype($v).'<br>');
$v=(binary)'';
print('3. variable casted as binary has type: '.gettype($v).'<br>');
?>
Expected result:
----------------
I suggest:
1. variable casted as string has type: string (OLD PHP 5 behaviour, in
PHP 6 for binary operation)
2. variable casted as unicode has type: unicode
Actual result:
--------------
1. variable casted as string has type: unicode
2. variable casted as unicode has type: unicode
3. variable casted as binary has type: string
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47169&edit=1