Re: HTTP_USER_AGENT?
| From: | Richard Lynch | Date: | Sun, 14 Jul 2002 01:58:54 +0000 |
| Subject: | Re: HTTP_USER_AGENT? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107569@lists.php.net to get a copy of this message | ||
>In article <20020711034110.14263.qmail@pb1.pair.com>,
>hesterloli@hotmail.com says...
>> For example in a book discussing PHP 3 it says:
>>
>> <?
>> phpinfo();
>> ?>
>>
>> This works just fine. In a book that discusses PHP 4 it says:
>>
>> <?
>> php_info()
>> ?>
>>
>> This gives "Fatal error: Call to undefined function: php_info() in
>> c:\inetpub\wwwroot\php\phpinfo.php on line 2."
>>
>> So it's not just backwards compatibility it is careless planning. This is not
>> good. I will have to search hi and lo to determine if a failure is due to
>> incorrect syntax because of version and not just careless typing on my part.
As far as I know, php_info() has never been a documented function. The
manual has always re-directed requests for php_info to phpinfo. Try it
yourself:
http://php.net/php_info
This is not a "new" behaviour nor a change in the language -- It's people
using an undocumented alias that they shouldn't.
I do not understand why people insist on using undocumented features, much
less putting them into text books.
Don't do that.
PHP actually has a pretty good history as far as backwards compatibility
goes. Not perfect, perhaps, but pretty good.
I suggest you complain to the Author, Technical Editor, or Publisher of the
book.
If that doesn't suit, feel free to write your web-pages in Fortran 77 :-)
--
Like Music? http://l-i-e.com/artists.htm