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 [Opn->Fbk]: Typecast does not work for function in class
by colder other posts by this author
May 8 2008 12:36AM messages near this date
#44940 [Fbk->Csd]: Typecast does not work for function in class | #44939 [NEW]: Depcreated functions while instealling pear
ID:               44940
 Updated by:       colder@[...].net
 Reported By:      blue765d at aol dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: WinXP
 PHP Version:      5.2.6
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?> ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Please give a complete reproduce script, so far your report looks
bogous.


Previous Comments:
------------------------------------------------------------------------

[2008-05-08 03:59:22] blue765d at aol dot com

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 this bug report at http://bugs.php.net/?id=44940&edit=1
Thread:
Blue765d At Aol Dot Com
colder
Blue765d At Aol Dot Com
colder

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved