recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
(PHP 3 >= 3.0.12, PHP 4, PHP 5)
strtotime -- Parse about any English textual datetime description into a Unix timestamp
The function expects to be given a string containing a US English date
format and will try to parse that format into a Unix timestamp (the
number of seconds since January 1 1970 00:00:00 GMT), relative
to the timestamp given in now, or the current time
if none is supplied.
This function will use the TZ environment variable (if
available) to calculate the timestamp. Since PHP 5.1.0 there are easier
ways to define the timezone that is used across all date/time functions.
That process is explained in the
date_default_timezone_get() function page.
Note: If the number of the year is specified in a two digit format, the values between 0-69 are mapped to 2000-2069 and 70-100 to 1970-2000.
timeThe string to parse, according to the GNU Date Input Formats syntax. Before PHP 5.0.0, microseconds weren't allowed in the time, since PHP 5.0.0 they are allowed but ignored.
nowThe timestamp used to calculate the returned value.
Returns a timestamp on success, FALSE otherwise. Previous to PHP 5.1.0, this function would return -1 on failure.
Every call to a date/time function will generate a E_NOTICE
if the time zone is not valid, and/or a E_STRICT message
if using the system settings or the TZ environment
variable. See also date_default_timezone_set()
| Warning |
In PHP 5 up to 5.0.2, "now" and other relative times are wrongly computed from today's midnight. It differs from other versions where it is correctly computed from current time. |
| Warning |
In PHP versions prior to 4.4.0, "next" is incorrectly computed as +2. A typical solution to this is to use "+1". |
Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.) Additionally, not all platforms support negative timestamps, therefore your date range may be limited to no earlier than the Unix epoch. This means that e.g. dates prior to Jan 1, 1970 will not work on Windows, some Linux distributions, and a few other operating systems. PHP 5.1.0 and newer versions overcome this limitation though.
Another Useful functions:
zend-api.zend-strtod | function.strtoupper | function.strtotime | function.strtolower | function.strtok | function.mb-strtoupper | function.mb-strtolower |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.