php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48571 Error in code example
Submitted: 2009-06-16 18:43 UTC Modified: 2009-06-16 18:51 UTC
From: a dot schilder at gmx dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
 [2009-06-16 18:43 UTC] a dot schilder at gmx dot net
Description:
------------
In the examples for 

locale_accept_from_http
Locale::acceptFromHttp

the brackets for the $_SERVER variable are wrong.

Reproduce code:
---------------
The current example:

<?php
$locale = locale_accept_from_http($_SERVER('HTTP_ACCEPT_LANGUAGE'));
echo $locale;
?>

<?php
$locale = Locale::acceptFromHttp($_SERVER('HTTP_ACCEPT_LANGUAGE'));
echo $locale;
?>


Expected result:
----------------
correct example, no error

Actual result:
--------------
wrong example, error

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-16 18:51 UTC] danbrown@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 11:00:02 2026 UTC