ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#44940 [NEW]: Typecast does not work for function in class
by Blue765d At Aol Dot Com other posts by this author
May 7 2008 8:59PM messages near this date
#44941 [Opn->Asn]: POST DATA LIMITED IN 60K WHEN LIMIT IS 20M | #44940 [Csd->Bgs]: Typecast does not work for function in class
From:             blue765d at aol dot com
Operating system: WinXP 
PHP version:      5.2.6
PHP Bug Type:     Scripting Engine problem
Bug description:  Typecast does not work for function in class

Description:
------------
When a function in a class returns something that was typecasted, the
typecast is ignored.

Reproduce code:
---------------
class test
{

public function foo()
{
$bar = "90";
return (int)$bar;
}

}



Expected result:
----------------
The expected result is for $bar to be returned as an integer. 

Actual result:
--------------
The actual result is that $bar is returned as a string.

-- 
Edit bug report at http://bugs.php.net/?id=44940&edit=1
-- 
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44940&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44940&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44940&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44940&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=44940&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44940&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44940&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44940&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44940&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44940&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=44940&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=44940&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44940&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44940&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44940&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44940&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44940&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44940&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44940&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44940&r=mysqlcfg
Thread:
Blue765d At Aol Dot Com
colder
Blue765d At Aol Dot Com
colder

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved