Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

suggestions

<?php 

$hour = '11';
$minute = '1';
$type = 'PM';

$startTime = date("H:i:00", strtotime(sprintf("%02d:%02d " . $type, $hour, $minute)));

echo $startTime; 
echo "\n\n";
echo date('h-i-s', strtotime($startTime));
echo "\n\n";
echo date('h-i-s A', strtotime($startTime)); // If am/pm is required


echo "\n\n";
$t = microtime(true);
$array = array();
for($i = 0; $i < 10000; $i++) {
    array_push($array, $i);
}
print microtime(true) - $t;
echo "\n";
$t = microtime(true);
$array = array();
for($i = 0; $i < 10000; $i++) {
    $array[] = $i;
}
print microtime(true) - $t;

echo "\n\n";
$t = microtime(true);
$array = array();
for($i = 0; $i < 10000; $i++) {
    $array[] = $i;
}
print microtime(true) - $t;
echo "\n";
$t = microtime(true);
$array = array();
for($i = 0; $i < 10000; $i++) {
    array_push($array, $i);
}
print microtime(true) - $t;

echo "\n\n";
$t = microtime(true);
$array = array();
for($i = 0; $i < 10000; $i++) {
    $array[] = $i;
}
print microtime(true) - $t;
echo "\n";
$t = microtime(true);
$array = array();
for($i = 0; $i < 10000; $i++) {
    array_push($array, $i);
}
print microtime(true) - $t;

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.