PHP Classes

File: phpcf-src/test/expected/comments.php

Recommend this page to a friend!
  Classes of Alex Krash   PHP Code formatter   phpcf-src/test/expected/comments.php   Download  
File: phpcf-src/test/expected/comments.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP Code formatter
Reformat PHP code according to standard options
Author: By
Last change:
Date: 10 years ago
Size: 545 bytes
 

Contents

Class file image Download
<?php
// forbidden comment starting with '#'
// single-line comment with indentation level 0
echo 'Hello world 1!';

echo
'Hello world 2!'; // single-line comment after a statement with indentation level 0

if ($hello) { // another single-line comment with indent level 0 and spaces after it
    // single-line comment with indent level > 0
// echo 'Hello world 3!'; // this line must be preserved as-is

   
do_something();

   
do_something_other(); // single-line comment with indent level > 0 after statement

   
echo 'I am weasel';
}