A
A
Alexander Vladimirovich2015-07-27 08:53:38
PHP
Alexander Vladimirovich, 2015-07-27 08:53:38

How to properly format the header of a php file according to standards?

meaning block of comments in the header

/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
// +---------------------------------------------------------------------------+
// | PHP version 5.6.11                                                        |
// +---------------------------------------------------------------------------+
// | Copyright (c) 2004-2015                                                   |
// +---------------------------------------------------------------------------+
// | 23 июл 2015                                                               |
// | Класс - Iptv                                                        |
// +---------------------------------------------------------------------------+
// | Author: Alexander Polyanin <[email protected]>                           |
// +---------------------------------------------------------------------------+
//
//

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Ivanov, 2015-07-27
@Writerim

well, something like this , but isn't it easier to put all this into some kind of separate file, so that in the future people do not sit and read 20 lines of unnecessary information?
I have always believed and will continue to believe that this information is redundant and absolutely unnecessary.

S
Sergey, 2015-07-27
Protko @Fesor

By standards, no way.
in any case it is usually a dock block one line after <?php containing which package the file belongs to, author information + contact details and license information.

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

Information like "tabstop=4" is usually written in files like . editorconfig

T
trevoga_su, 2015-07-27
@trevoga_su

The bottom line is that all these comments in the cap are not needed by anyone. It amuses me how any g-code necessarily contains a massive header with stupid information and a bunch of copyrights.
Please comment on the code!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question