[Phpmyadmin-devel] about spacing around operators

Dieter Adriaenssens dieter.adriaenssens at gmail.com
Tue Apr 2 22:17:05 CEST 2013


2013/4/2 Marc Delisle <marc at infomarc.info>:
> Isaac Bennetch a écrit :
>>
>> On Apr 2, 2013, at 6:10 AM, Michal Čihař <michal at cihar.com> wrote:
>>
>>> Hi
>>>
>>> Dne Mon, 01 Apr 2013 08:06:06 -0400
>>> Marc Delisle <marc at infomarc.info> napsal(a):
>>>
>>>> I was looking at [0] to find the requirement about spacing around
>>>> operators, to no avail. No more luck in [1].
>>>>
>>>> I prefer this requirement but we should mention it somewhere.
>>> Indeed it seems not to be covered, so we should include in our wiki.
>>> Maybe this would be useful:
>>>
>>> http://drupal.org/coding-standards#operators
>
> What triggered my questionning is the exclamation mark, for example
>
> if ($foo && ! $blah)
>
> but the Drupal's coding standard mentions that unary operators (like ++)
> should not have a space between the operator. So, where does our "space
> after exclamation mark" practice come from? Just for readability?

When looking around a bit, I find mostly examples with no space after
!, but on the php.net documentation page, there is a space between !
and the variable [0].

[0] http://www.php.net/manual/en/language.operators.logical.php

--
Kind regards,

Dieter Adriaenssens




More information about the Developers mailing list