PHP code example of vicimus / standard

1. Go to this page and download the library: Download vicimus/standard library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vicimus / standard example snippets


// Good --
/**
 * A method!
 *
 * @param string $value  This is the value to pass
 * @param int    $number Another parameter here
 *
 * @return Response
 */

 // Bad --
 /**
  * A method!
  *
  * @param  string $value
  * @param int $number Another parameter here
  *
  * @return Response
  */

 declare(strict_types = 1);

namespace ...

function foo(
    int $foo = null, // ? missing
    ?int $bar = null // correct
) {

}

    function foo(): ?int

if ($file = findFile($path)) {

}