Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: Always use class aliases? Date: Sun, 10 Jul 2022 04:39:43 +0200 Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net 99Ejd085iUbRKU0HaKxpFwGPB5mRlLOPzQlC59JIiiodzuH9qw Cancel-Lock: sha1:dp8Wa+gOPeMa60x1NUmvzY7VNJs= Content-Language: de-DE In-Reply-To: Xref: csiph.com comp.lang.php:19054 Flash: > Il 06/07/22 20:02, Arno Welzel ha scritto: >> This makes no sense at all. You don't need an alias if you use the class >> at it is: >> >> > use MyClass; > > > ~$ php -r 'use stdClass;' > > Warning: The use statement with non-compound name 'stdClass' has no > effect in Command line code on line 1 Yes, I forgot that you need the namespace as well, either defined in the use statement: -- Arno Welzel https://arnowelzel.de