PEAR Coding Standards

From: Date: Thu, 17 Mar 2016 21:18:17 +0000
Subject: PEAR Coding Standards
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-55514@lists.php.net to get a copy of this message
Hi everyone, After updating the Header Comments Block in the Coding Standards to include mention of PHP 7, I've been looking over the PEAR Coding Standards today, spotting a few things to update and thought to check over a few things. on https://pear.php.net/manual/en/standards.arrays.php correct indents for assignments in arrays are described: <?php $some_array = array( 'foo' => 'bar', 'spam' => 'ham', ); ?> In my opinion. that should also include short array syntax (which is a long overdue update I think) <?php $some_array = [ 'foo' => 'bar', 'spam' => 'ham', ]; ?> Comments.... Is there any specific reason why comments can't be started with an octothorpe, i.e. # a comment ? (If only just to answer the question "why?" asked there at https://pear.php.net/manual/en/standards.comments.php ) Tags... On the "tags page" ( https://pear.php.net/manual/en/standards.tags.php ) it's anbiguous whether the closing php tag needs to be included or not (if the file contains nothing but PHP code.) I'm also wondering if we want to at least refer to PSRs 0-2 at this stage? Thanks Ken -- http://about.me/kenguest/

« previous php.pear.dev (#55514) next »