ID:               28094
 Updated by:       [EMAIL PROTECTED]
 Reported By:      steve at przepiora dot org
-Status:           Open
+Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: windows xp
 PHP Version:      5.0.0RC1
 New Comment:

Class type hints do not work with non-classes, like 
strings, integers, and arrays.

The error message is telling you it's expecting a class 
named "string." :)


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

[2004-04-21 16:40:25] steve at przepiora dot org

Description:
------------
When using class type hints with a string a runtime error occurs. 

Reproduce code:
---------------
<?php
function foo(string $bar){
    echo $bar;
}

foo("baz");
?>

Expected result:
----------------
The printout of "baz"



Actual result:
--------------
Fatal error: Argument 1 must be an object of class string in c:\program
files\apache group\Apache\htdocs\index.php on line 2


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28094&edit=1

Reply via email to