PHPDaemon\Core\Debug::dump PHP Méthode

dump() public static méthode

Wrapper of var_dump
public static dump ( $args ) : string
Résultat string Result of var_dump()
    public static function dump(...$args)
    {
        ob_start();
        foreach ($args as $v) {
            var_dump($v);
        }
        $dump = ob_get_contents();
        ob_end_clean();
        return $dump;
    }

Usage Example

 public function run()
 {
     $captcha = new \WakePHP\Utils\CaptchaDraw();
     $captcha->setText($this->args[1]);
     $captcha->show($file = tempnam(sys_get_temp_dir(), 'php'));
     $this->parent->captcha->uploadImage($this->args[0], file_get_contents($file), function ($lastError) {
         Daemon::log(Debug::dump($lastError));
         $this->sendResult(true);
     });
 }
All Usage Examples Of PHPDaemon\Core\Debug::dump