From: lunter at interia dot pl
Operating system: all
PHP version: 6CVS-2009-01-20 (snap)
PHP Bug Type: Unicode Engine related
Bug description: cast, gettype
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 bug report at http://bugs.php.net/?id=47169&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47169&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47169&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47169&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47169&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47169&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47169&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47169&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47169&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47169&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47169&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47169&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47169&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47169&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47169&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47169&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47169&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47169&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47169&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47169&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47169&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47169&r=mysqlcfg