Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65133 invoked from network); 19 Sep 2015 09:48:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2015 09:48:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:39382] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/E1-43089-46F2DF55 for ; Sat, 19 Sep 2015 05:48:21 -0400 Received: (qmail 25086 invoked by uid 89); 19 Sep 2015 09:48:18 -0000 Received: by simscan 1.3.1 ppid: 25070, pid: 25077, t: 0.2741s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.160.91.166) by mail4.serversure.net with ESMTPA; 19 Sep 2015 09:48:17 -0000 To: internals@lists.php.net Message-ID: <55FD2F61.9010603@lsces.co.uk> Date: Sat, 19 Sep 2015 10:48:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Coding styles ... From: lester@lsces.co.uk (Lester Caine) I get that a lot of people think that the only way forward with PHP is fully typed, strict checking and blocking anything that may be deemed to be risky. However PHP7 has not yet dropped the simple object-less style of programming that it originally developed from. That is why tidying up a simple procedural style of working still has a place. The debate on 'exists()' or to give it a tidier title 'variable_exists()' is more about just how much of a procedural style of programming remains in PHP in the future. Yes there are other ways of working, and using associative arrays direct gives a different set of tools, which then morph again in objects, and it's the piecemeal way things have been bolted on which has caused that so that the 'simple' functions have fallen through the gaps? array::exists() and object::exists() would have been tidy extensions to exists() if one was starting again with a clean sheet, but we have what we have and procedural PHP is still integral so can we please just clean up the gaps rather than pushing 'more modern' ways of working. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk