Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77896 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10100 invoked from network); 12 Oct 2014 08:37:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2014 08:37:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:47765] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/C1-01239-5DD3A345 for ; Sun, 12 Oct 2014 04:37:42 -0400 Received: (qmail 20667 invoked from network); 12 Oct 2014 10:37:38 +0200 Received: from unknown (HELO RoLaptop) (80.66.46.208) by ns73.kreativmedia.ch with (AES128-SHA encrypted) SMTP; 12 Oct 2014 10:37:37 +0200 To: "'PHP internals'" Date: Sun, 12 Oct 2014 10:37:37 +0200 Message-ID: <000901cfe5f7$c7acd7f0$570687d0$@tutteli.ch> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000A_01CFE608.8B37A3C0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac/l9vPRExy2mfDzR9m/HilwI49ggg== Content-Language: de-ch Subject: disallow non-static method calls with self/static in PHP 7 From: php@tutteli.ch ("Robert Stoll") ------=_NextPart_000_000A_01CFE608.8B37A3C0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hey, I just stumbled over a method call of a non-static method with self and was asking myself again, why does PHP support this behaviour. An example to outline what I am writing of: class A{ function foo(){ self::bar(); } function bar(){} } IMO it should not be allowed to call non-static methods with self or static. Sure, it is just a small detail but for someone who starts learning PHP it is an unnecessary supplement. Maybe it is too drastic to disallow it in PHP 7 but yeah. I would like to know what you think about it and if someone has a good reason why it is allowed nowadays then please help me out. Cheers, Robert ------=_NextPart_000_000A_01CFE608.8B37A3C0--