Bug #74352 [Opn->Nab]: Summary
| From: | requinix@php.net | Date: | Fri, 31 Mar 2017 20:48:03 +0000 |
| Subject: | Bug #74352 [Opn->Nab]: Summary | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208242@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74352&edit=1
ID: 74352
Updated by: requinix@php.net
Reported by: deadmoras5 at gmail dot com
Summary: Summary
-Status: Open
+Status: Not a bug
Type: Bug
Package: *Programming Data Structures
Operating System: Windows 8.1 x64
PHP Version: 7.1Git-2017-03-31 (Git)
Block user comment: N
Private report: N
New Comment:
http://php.net/manual/en/language.pseudo-types.php
Previous Comments:
------------------------------------------------------------------------
[2017-03-31 20:20:14] deadmoras5 at gmail dot com
Description:
------------
Mixed (type) it's not a mixed in other language (java, c, etc);
It's a unique type, because string, array, any class and other not = mixed or \mixed;
Test script:
---------------
public function changeValue(string $name, \mixed $data): ClassName {}
$object = new ClassName();
$object->changeValue('name', 'email')->getResult();
Expected result:
----------------
FatalThrowableError in ClassName.php line 54:
Type error: Argument 2 passed to App\Http\ResponseDataService\ClassName::changeValue() must be an
instance of mixed, string given
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74352&edit=1