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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 16:01:33 2025 UTC