set_time_limit(0);
.$start = new DateTime();
// do something...
$end = new DateTime();
$lapse = $start->diff($end);
/*
Key Formatting Placeholders:
%y: Years
%m: Months
%d: Days
%h: Hours
%i: Minutes
%s: Seconds
%a: Total number of days
*/
echo "<p>LAPSE: " . $lapse->format("%s seconds") . "</p>";
.date_default_timezone_set("Asia/Kuala_Lumpur");
.date("d F Y (l) h:i:s A");
// example: 25 April 2026 (Saturday) 07:44:15 PM
.if (class_exists("ZipArchive")) {
echo "ZipArchive is enabled.";
}
.// ENTER SETUP
// ===========
$zipFile = "FILENAME.zip";
// LEAVE SETUP
// ===========
$extractTo = "./";
$zip = new ZipArchive;
if ($zip->open($zipFile) === TRUE) {
$zip->extractTo($extractTo);
$zip->close();
echo "<p class=\"success\">UNZIPPED.</p>";
} else {
echo "<p class=\"error\">ERROR: CANNOT UNZIP.</p>";
}
.// ENTER SETUP
// ===========
$zipFile = "FILENAME.zip";
// LEAVE SETUP
// ===========
if (file_exists($zipFile)) {
if (unlink($zipFile)) {
echo "<p class=\"success\">ZIP FILE DELETED.</p>";
} else {
echo "<p class=\"error\">ERROR: CANNOT DELETE ZIP FILE.</p>";
}
} else {
echo "<p class=\"error\">ERROR: ZIP FILE NOT FOUND.</p>";
}
.max_execution_time:
ini_get("max_execution_time");
.phpinfo();
.Search the entire website: