PHP Einsteigerkurs - Grundlagen der PHP/MySQL Programmierung in 5 Tagen verstehen by Thenmayer Klaus

PHP Einsteigerkurs - Grundlagen der PHP/MySQL Programmierung in 5 Tagen verstehen by Thenmayer Klaus

Author:Thenmayer, Klaus [Thenmayer, Klaus]
Language: deu
Format: epub
Published: 2012-05-04T22:00:00+00:00


/*

Zwei Dummyvariablen, damit wir für das Script etwas Rechenaufwand erzeugen können:

*/

$dummyVariable1 = 1;

$dummyVariable2 = 3;

$x = 0;

while ($x < 1000000) {

$x++;

$dummyVariable1 *= $dummyVariable2;

$dummyVariable1 = $dummyVariable1 / $dummyVariable2;

}

$end = microtime(true);

echo "Laufzeit: " . ($end - $start) . "ms";

?>

Das hat zum Beispiel die Ausgabe:

Laufzeit: 0.1886830329895ms

Zeitpunkt an die date() Funktion übergeben mit mktime()

Möchte man einen bestimmten Zeitpunkt ausgeben, so muss man dies zum Beispiel mit der Funktion mktime (Stunde, Minute, Sekunde, Monat, Tag, Jahr) bewerkstelligen:

<?php

echo date("Y-m-d", mktime(0, 0, 0, 5, 17, 2012));

?>



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.