PHP Classes

File: src/functions.php

Recommend this page to a friend!
  Packages of samik71   Pretty Print   src/functions.php   Download  
File: src/functions.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Pretty Print
Output array contents using PyTorch style
Author: By
Last change:
Date: 1 year ago
Size: 650 bytes
 

 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace {

    use Apphp\PrettyPrint\PrettyPrint;

    /**
     * Convenience wrapper around PrettyPrint's callable interface.
     * @param ...$args
     * @return void
     */
    function pprint(...$args): void
    {
        (new PrettyPrint())(...$args);
    }

    /**
     * Alias for pprint
     * @param ...$args
     * @return void
     */
    function pp(...$args): void
    {
        pprint(...$args);
    }

    /**
     * Alias for pprint with exit after printing
     * @param ...$args
     * @return void
     */
    function ppd(...$args): void
    {
        pprint(...$args);
        exit;
    }
}