time.now

Description

Returns the elapsed time in seconds since January 1, 1970.

Syntax

number = time()

Return Value

Returns the time in seconds since the creation of the UNIXverse.

date

date -- Print a date in SQL format

Description

string date ( [number timestamp] )

Returns a string representation of timestamp in the format 'YYYY-MM-DD'. If timestamp is not defined, the function will use the current system date.

Parameters

timestamp

The number of seconds since January 1, 1970 (commonly called a UNIX timestamp).

Return Values

Returns a formatted date string in the format 'YYYY-MM-DD'.

Examples

Example 1. A strlen() example

<?php
$str 
'abcdef';
echo 
strlen($str); // 6

$str ' ab cd ';
echo 
strlen($str); // 7
?>

Array
(
    [0] => f'oo
    [1] => b'ar
    [2] => Array
        (
            [0] => fo'o
            [1] => b'ar
        )
)

See Also

count()
mb_strlen()