note 81579 added to ref.datetime

From: Date: Tue, 04 Mar 2008 18:31:18 +0000
Subject: note 81579 added to ref.datetime
Groups: php.notes 
Request: Send a blank email to php-notes+get-136739@lists.php.net to get a copy of this message
I am not sure if this is a bug or a bit of bad documentation... In the manual page for Date and Time Functions ( http://us.php.net/manual/en/ref.datetime.php ) the manual says that the functions in that list are available as of version 5.1.3. In some cases individual functions are said the be available as of 5.1.0. However, I am finding that on both my Windows and Linux machines running PHP 5.1.6 that a good many of the date functions AND date constants are not showing up: <?php echo '<p>PHP Version: ', PHP_VERSION, '</p>'; $df = get_defined_functions(); $dc = get_defined_constants(); $af = array(); $ac = array(); foreach ($df['internal'] as $f) { if (preg_match('#date|time#', $f)) { $af[] = $f; } } sort($af); foreach ($dc as $c => $v) { if (preg_match('#DATE|TIME#', $c)) { $ac[] = $c; } } sort($ac); echo '<pre>', print_r($af, 1), '</pre>'; echo '<pre>', print_r($ac, 1), '</pre>'; ?> Yields: PHP Version: 5.1.6 Array ( [0] => checkdate [1] => date [2] => date_default_timezone_get [3] => date_default_timezone_set [4] => date_sun_info [5] => date_sunrise [6] => date_sunset [7] => easter_date [8] => fileatime [9] => filectime [10] => filemtime [11] => get_magic_quotes_runtime [12] => getdate [13] => gettimeofday [14] => gmdate [15] => gmmktime [16] => gmstrftime [17] => hash_update [18] => hash_update_file [19] => hash_update_stream [20] => idate [21] => localtime [22] => magic_quotes_runtime [23] => microtime [24] => mktime [25] => set_magic_quotes_runtime [26] => set_time_limit [27] => socket_set_timeout [28] => stream_set_timeout [29] => strftime [30] => strtotime [31] => time [32] => variant_date_from_timestamp [33] => variant_date_to_timestamp ) Array ( [0] => CONNECTION_TIMEOUT [1] => CURLE_OPERATION_TIMEOUTED [2] => CURLINFO_CONNECT_TIME [3] => CURLINFO_FILETIME [4] => CURLINFO_NAMELOOKUP_TIME [5] => CURLINFO_PRETRANSFER_TIME [6] => CURLINFO_REDIRECT_TIME [7] => CURLINFO_STARTTRANSFER_TIME [8] => CURLINFO_TOTAL_TIME [9] => CURLOPT_CONNECTTIMEOUT [10] => CURLOPT_DNS_CACHE_TIMEOUT [11] => CURLOPT_FILETIME [12] => CURLOPT_LOW_SPEED_TIME [13] => CURLOPT_TIMECONDITION [14] => CURLOPT_TIMEOUT [15] => CURLOPT_TIMEVALUE [16] => CURL_TIMECOND_IFMODSINCE [17] => CURL_TIMECOND_IFUNMODSINCE [18] => CURL_TIMECOND_LASTMOD [19] => DATE_ATOM [20] => DATE_COOKIE [21] => DATE_ISO8601 [22] => DATE_RFC1036 [23] => DATE_RFC1123 [24] => DATE_RFC2822 [25] => DATE_RFC3339 [26] => DATE_RFC822 [27] => DATE_RFC850 [28] => DATE_RSS [29] => DATE_W3C [30] => FTP_TIMEOUT_SEC [31] => LC_TIME [32] => LDAP_OPT_TIMELIMIT [33] => MYSQLI_CURSOR_TYPE_FOR_UPDATE [34] => MYSQLI_OPT_CONNECT_TIMEOUT [35] => MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH [36] => MYSQLI_TIMESTAMP_FLAG [37] => MYSQLI_TYPE_DATE [38] => MYSQLI_TYPE_DATETIME [39] => MYSQLI_TYPE_NEWDATE [40] => MYSQLI_TYPE_TIME [41] => MYSQLI_TYPE_TIMESTAMP [42] => SQL_DATE [43] => SQL_TIME [44] => SQL_TIMESTAMP [45] => SUNFUNCS_RET_TIMESTAMP [46] => VT_DATE ) Perhaps there is something not being said in the documentation regarding these functions that "There is no installation needed to use these functions; they are part of the PHP core." ---- Server IP: 64.71.164.2 Probable Submitter: 209.209.13.138 ---- Manual Page -- http://www.php.net/manual/en/ref.datetime.php Edit -- https://master.php.net/note/edit/81579 Del: integrated -- https://master.php.net/note/delete/81579/integrated Del: useless -- https://master.php.net/note/delete/81579/useless Del: bad code -- https://master.php.net/note/delete/81579/bad+code Del: spam -- https://master.php.net/note/delete/81579/spam Del: non-english -- https://master.php.net/note/delete/81579/non-english Del: in docs -- https://master.php.net/note/delete/81579/in+docs Del: other reasons-- https://master.php.net/note/delete/81579 Reject -- https://master.php.net/note/reject/81579 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136739) next »