|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2011-06-12 23:10 UTC] felipe@php.net
  [2011-06-12 23:10 UTC] felipe@php.net
 
-Summary:     class_alias and type hint (II.)
+Summary:     class_alias and type hint
-Status:      Open
+Status:      Closed
-Package:     Compile Failure
+Package:     Scripting Engine problem
-Assigned To:
+Assigned To: felipe
  [2011-06-12 23:10 UTC] felipe@php.net
  [2012-04-18 09:50 UTC] laruence@php.net
  [2012-07-24 23:41 UTC] rasmus@php.net
  [2013-11-17 09:37 UTC] laruence@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
Description: ------------ class_alias() is not taken into account by type hints. Note: there is eval(), so this is NOT PARSING-TIME error. Alias was created before eval is parsed. Test script: --------------- <?php class A { function foo(A $param) { } } class_alias('A', 'AliasA'); eval(' class B extends A { function foo(AliasA $param) { } } '); Expected result: ---------------- no error Actual result: -------------- Strict Standards: Declaration of B::foo() should be compatible with that of A::foo()