Praktisk brug af operationer i PHP
Lad os finde ud af, hvor mange sekunder der er i en time. Som
velkendt er der 60 sekunder i et
minut, og i en time - 60 minutter. For at
finde antallet af sekunder i en time skal
60 ganges med 60:
<?php
echo 60 * 60; // antal sekunder i en time
?>
Find antallet af sekunder i et døgn.
Find antallet af sekunder i 30 dage.
Find antallet af sekunder i et år.
Find antallet af minutter i et døgn.
Find antallet af minutter i et år.
Find antallet af bytes i en megabyte.
Find antallet af bytes i en gigabyte.
Find antallet af bytes i 10 gigabyte.
Find antallet af bytes i en terabyte.
Find antallet af kilobyter i en terabyte.