PHP Classes
elePHPant
Icontem

File: vendor/nikic/php-parser/test/bootstrap.php

Recommend this page to a friend!
  Classes of Renato De Oliveira Lucena  >  PHP Pokemon Script  >  vendor/nikic/php-parser/test/bootstrap.php  >  Download  
File: vendor/nikic/php-parser/test/bootstrap.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Pokemon Script
Provides an API to manage a database of Pokemons
Author: By
Last change:
Date: 1 year ago
Size: 446 bytes
 

Contents

Class file image Download
<?php

namespace PhpParser;

require
__DIR__ . '/../vendor/autoload.php';

function
canonicalize($str) {
   
// normalize EOL style
   
$str = str_replace("\r\n", "\n", $str);

   
// trim newlines at end
   
$str = rtrim($str, "\n");

   
// remove trailing whitespace on all lines
   
$lines = explode("\n", $str);
   
$lines = array_map(function($line) {
        return
rtrim($line, " \t");
    },
$lines);
    return
implode("\n", $lines);
}