Last Updated: February 25, 2016
·
393
· teknonono

debug php

 /*add in front of code to show all erros */
error_reporting(E_ALL);
ini_set("display_errors", 1);

/* kkk */
$fp = fopen("/tmp/kurtdebug", "w");
$str = '';

ob_start();
var_dump($var);
$vardump = ob_get_clean();
$str .= 'vardump: '.$vardump."\n";

$str .= ' :'.$var->$para.' : '.$var->$para;

foreach ($array as $key => $val) {
     echo "$key = $val\n";
 }

fwrite($fp, $str. "\n");
fclose($fp);  

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Related Tags
#php
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside