转换GPC_quotes和得到程序运行时间

class MattCore_Source implements MattCore
{
private $executionTime ;

function __construct()
{
$this -> executionTime = microtime ( true );

$_GET = self :: set_GPC_quotes( $_GET );
$_POST = self :: set_GPC_quotes( $_POST );
$_COOKIE = self :: set_GPC_quotes( $_COOKIE );
}


public function set_GPC_quotes( $data )
{
if ( ! get_magic_quotes_gpc ()){
if ( is_array ( $data )){
foreach ( $data as $key => $value ){
$data [ $key ] = self :: set_GPC_quotes( $value );
}
}
else {
$data = addslashes ( $data );
}
}
return $data ;
}

public function runTime()
{
return number_format (( microtime ( true ) - $this -> executionTime) , 5 );
}

}

你可能感兴趣的:(转换)