src/Console.php
public function logMemory($object = null, $name = 'PHP', $literal = false)
    {
        $memory = memory_get_usage();
        $dataType = '';
        if (!is_null($object) && !$literal) {
            $memory = strlen(serialize($object));
            $dataType = gettype($object);
        } else if (is_numeric($object) && $literal) {
            $memory = floatval($object);
        }

        array_push($this->store, array(
            'name'      => $name,
            'data'      => $memory,
            'data_type' => $dataType,
            'type'      => 'memory'
        ));
    }
public function logMemory($object = null, $name = 'PHP', $literal = false)
    {
        $memory = memory_get_usage();
        $dataType = '';
        if (!is_null($object) && !$literal) {
            $memory = strlen(serialize($object));
            $dataType = gettype($object);
        } else if (is_numeric($object) && $literal) {
            $memory = floatval($object);
        }

        array_push($this->store, array(
            'name'      => $name,
            'data'      => $memory,
            'data_type' => $dataType,
            'type'      => 'memory'
        ));
    }
public function logMemory ( $ object = null , $ name = 'PHP' , $ literal = false ) { $ memory = memory_get_usage ( ) ; $ dataType = '' ; if ( ! is_null ( $ object ) && ! $ literal ) { $ memory = strlen ( serialize ( $ object ) ) ; $ dataType = gettype ( $ object ) ; } else if ( is_numeric ( $ object ) && $ literal ) { $ memory = floatval ( $ object ) ; } array_push ( $ this -> store , array ( 'name' => $ name , 'data' => $ memory , 'data_type' => $ dataType , 'type' => 'memory' ) ) ; }
Logs memory usage of a variable
If no parameter is passed in, logs current memory usage

@param mixed $object
@param string $name
@param boolean $literal
Logs memory usage of a variable If no parameter is passed in logs current memory usage