Edit report at https://bugs.php.net/bug.php?id=55114&edit=1

 ID:                 55114
 Updated by:         [email protected]
 Reported by:        paulgao at yeah dot net
 Summary:            scalar type hints error...
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   irrelevant
 PHP Version:        5.4.0alpha1
 Block user comment: N
 Private report:     N

 New Comment:

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

We do not have scalar type hint.


Previous Comments:
------------------------------------------------------------------------
[2011-07-02 13:26:36] paulgao at yeah dot net

Description:
------------
Plz see script.

Test script:
---------------
<?php

function foo(int $bar)
{
    return $bar + 1;
}

echo foo(99);

?>

Expected result:
----------------
C:\PHP54_VC9>php test.php
100

Actual result:
--------------
C:\PHP54_VC9>php test.php
Catchable fatal error: Argument 1 passed to foo() must be an instance of int, in
teger given, called in C:\PHP54_VC9\test.php on line 8 and defined in C:\PHP54_V
C9\test.php on line 3



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



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

Reply via email to