HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: /home/mmickelson/spilicensing/vendor/nikic/php-parser/test/bootstrap.php
<?php

namespace PhpParser;

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

function canonicalize($str) {
    // trim from both sides
    $str = trim($str);

    // normalize EOL to \n
    $str = str_replace(array("\r\n", "\r"), "\n", $str);

    // trim right side of all lines
    return implode("\n", array_map('rtrim', explode("\n", $str)));
}