php-src code style

php.internals

Legale Legage

7 years ago
Hello, internals. I was trying to find code style guide for php-src project on the wiki.php.net The only thing i found: http://doc.php.net/tutorial/style.php Do we have a code style guide in the form of a document? Will it be ok if I use these parameters: 1. Encoding: utf-8 (without BOM) 2. Line separator: \n 3. Line width: 120 chars 4. If something doesn't fit on the line, then break the line and start on the next one with a single indent relative to the indent of the current code block. Example: function fun(int a, int b, int c, int d) 5. Сommas, colons, question marks etc remain on the broken line. Example: c = (a == b) ? 1 : 2; char a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, };

Christoph Becker

7 years ago
On 19.01.2019 at 13:46, Legale Legage wrote:
> Hello, internals. > I was trying to find code style guide for php-src project on the > wiki.php.net > The only thing i found: > > http://doc.php.net/tutorial/style.php
This is about the documentation (aka. PHP manual).
> Do we have a code style guide in the form of a document?
See <https://github.com/php/php-src/blob/master/CODING_STANDARDS>.
-- Christoph M. Becker

Legale Legage

7 years ago
Got it, thanks! On Sat, 19 Jan 2019 at 15:49, Christoph M. Becker <cmbecker69@gmx.de> wrote: