Bug #73853 [Opn->Nab]: Aliasing a method still throws errors about static / non-static

From: Date: Wed, 11 Jan 2017 05:03:50 +0000
Subject: Bug #73853 [Opn->Nab]: Aliasing a method still throws errors about static / non-static
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206490@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73853&edit=1 ID: 73853 Updated by: krakjoe@php.net Reported by: bowersbros at gmail dot com Summary: Aliasing a method still throws errors about static / non-static -Status: Open +Status: Not a bug Type: Bug Package: Scripting Engine problem Operating System: Irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: There are mistakes or incorrect assumptions in your code. Previous Comments: ------------------------------------------------------------------------ [2017-01-02 21:54:45] bowersbros at gmail dot com Description: ------------ A method that is declared as static, and has a trait override the method that is non-static, but is aliased, a fatal error is still thrown, even though it is aliased. Example: https://3v4l.org/Ig0Al Test script: --------------- <?php trait MyTest { public function name() { return 'other string'; } } abstract class Testing { public static function name() { return 'string'; } } class AnotherExample extends Testing { use MyTest { MyTest::name as newName; } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73853&edit=1

« previous php.bugs (#206490) next »