PHP Classes

File: include/function/misc.php

Recommend this page to a friend!
  Classes of Kakhaber Kashmadze   hiutils   include/function/misc.php   Download  
File: include/function/misc.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: hiutils
Utility functions to process request data
Author: By
Last change: Update of include/function/misc.php
Date: 1 year ago
Size: 393 bytes
 

Contents

Class file image Download
<?php
/*
  Created by Kakhaber Kashmadze
  @version 0.1
  @license MIT
*/

/* alternative of var_dump with pre or json formating */
function vardump($var, $task=null){
    if(!empty(
$task)){
        if(
$task=='pre'){
            echo
'<div><pre>';
           
var_dump($var);
            echo
'</pre></div>';
        }elseif(
$task=='json'){
           
$json = json_encode((array)$var );
            echo(
$json);
        }
    }else{
       
var_dump($var);
    }
}