I think this information should be individualized per function. Each would mention the conditions that need to be met, and why it may not be met. Having one entity for this will only scare the user and force extra work on those who will have it available. I am guessing that some of these conditions are always true (natively or artificially by PHP) so that's something else to consider.
A few examples. The money_format() docs have the following note: The function money_format() is only defined if the system has strfmon capabilities. For example, Windows does not, so money_format() is undefined in Windows. In this case the user at least knows they need strfmon. It is meant to show Windows is not the only "problem" here. Another example is touch(). It requires utime which I assume all OS's have although I don't know. And if not I assume PHP might essentially say "No utime huh? Let's use mtime/atime/ctime instead and define HAVE_UTIME as true." Again, I don't know this topic of utime so am only guessing here. In summary: I agree something needs to be done although feel one entity will not do the job. Extra work, but worth it. Regards, Philip On Wed, 11 Aug 2004, Dave Barr wrote: > Some functions are system-dependent in that if they're not detected at > compile time, they won't be included in PHP. Currently the > documentation does not tell the user any information about this type > of function availability and could cause some confusion when a user > tries to use a function and it says "Call to undefined function". > > Opinions of the proposed entity?: > > <!ENTITY note.func.sysdep '<note><para>This function is system-dependent > and may not be available in your copy of PHP. Use > <function>function_exists</function> to be certain.</para></note>'> > > Looking at php-src/ext/standard/basic_functions.c for example, these > functions may or may not be available in your copy of PHP, depending > on various factors: > > time_nanosleep() strftime() > gmstrftime() strcoll() > money_format() nl_langinfo() > readlink() linkinfo() > symlink() link() > proc_open() proc_close() > proc_terminate() proc_get_status() > proc_nice() getservbyname() > getservbyport() getprotobyname() > getprotobynumber() asinh() > aconh() atanh() > hypot() inet_ntop() > inet_pton() putenv() > getopt() microtime() > gettimeofday() stream_set_timeout() > realpath() fnmatch() > crypt() chroot() > glob() touch() > openlog() syslog() > closelog() define_syslog_variables() > ftok() > > Dave >