php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55824 Type Check / Hint
Submitted: 2011-09-30 19:44 UTC Modified: 2011-10-02 16:42 UTC
From: rsmaia at gmail dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.4.0beta1 OS: GNU/Linux 2.6.32-5-686
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rsmaia at gmail dot com
New email:
PHP Version: OS:

 

 [2011-09-30 19:44 UTC] rsmaia at gmail dot com
Description:
------------
Refs:
https://wiki.php.net/rfc/typechecking
https://wiki.php.net/rfc/typecheckingparseronly

Test script:
---------------
--TEST--

--FILE--
<?php
function test( string $str ) {
 echo gettype( $str );
}

test('text');
?>
--EXPECT--
string



Expected result:
----------------
string

Actual result:
--------------
Catchable fatal error: Argument 1 passed to test() must be an instance of string, 
string given, called in /root/php-5.4.0beta1/test01.php on line 6 and defined in 
/root/php-5.4.0beta1/test01.php on line     2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-02 16:42 UTC] felipe@php.net
-Status: Open +Status: Bogus
 [2011-10-02 16:42 UTC] felipe@php.net
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

The patch has been reverted. The change isn't in the SVN.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 19:01:28 2024 UTC