php原生自定义调试输出 private function local_test($print,$die = false){ if($_GET['debug'] || $_POST['debug']){ if(is_array($print)){ echo json_encode($print).PHP_EOL; }else { $test = print_r($print, 1) . PHP_EOL; echo $test; } $die && die(); } }