2019-03-14 10:30:11 +01:00
|
|
|
<?php
|
|
|
|
|
2019-03-14 16:48:02 +01:00
|
|
|
namespace MVC\Classe;
|
|
|
|
|
2020-12-09 10:26:26 +01:00
|
|
|
class Dumper
|
|
|
|
{
|
|
|
|
public static function dump($var)
|
|
|
|
{
|
2019-03-14 10:30:11 +01:00
|
|
|
echo "<pre>";
|
2019-12-04 15:21:19 +01:00
|
|
|
if (is_bool($var)) {
|
|
|
|
echo ($var) ? "true" : "false";
|
|
|
|
} else {
|
|
|
|
print_r($var);
|
|
|
|
}
|
2019-03-14 10:30:11 +01:00
|
|
|
echo "</pre>";
|
|
|
|
}
|
2020-12-08 09:28:12 +01:00
|
|
|
/**
|
|
|
|
* Fonction Statique permettant d'initialiser les valeurs de php lors du script courant
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public static function setPHPvalues()
|
|
|
|
{
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
ini_set('display_startup_errors', 1);
|
|
|
|
ini_set('memory_limit', -1);
|
|
|
|
ini_set('max_execution_time', 0);
|
|
|
|
ini_set('default_socket_timeout', -1);
|
|
|
|
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
2020-12-09 10:26:26 +01:00
|
|
|
}
|