#28859 [Opn->Csd]: sscanf optional parameters causes warning
| From: | betz@php.net | Date: | Mon, 21 Jun 2004 07:36:14 +0000 |
| Subject: | #28859 [Opn->Csd]: sscanf optional parameters causes warning | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969361467@lists.php.net to get a copy of this message | ||
ID: 28859
Updated by: betz@php.net
Reported By: wetstreams at yahoo dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: windows 2000
PHP Version: 4.3.7
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2004-06-20 22:57:12] rasmus@php.net
This is a simple documentation problem. The &'s should be removed from
that example.
------------------------------------------------------------------------
[2004-06-20 22:10:22] wetstreams at yahoo dot com
Description:
------------
If you copy the example below from the manual, and run with
error_reporting = E_ALL in php.ini
you get the result below.
Reproduce code:
---------------
<!-- Example 2 from http://us2.php.net/sscanf -->
<html><body>
<?php
// get author info and generate DocBook entry
$auth = "24\tLewis Carroll";
$n = sscanf($auth, "%d\t%s %s", &$id, &$first, &$last);
echo "<author id='$id'>
<firstname>$first</firstname>
<surname>$last</surname>
</author>\n";
?>
</body></html>
Expected result:
----------------
I expected the example from the documentation to work.
Actual result:
--------------
Warning: Call-time pass-by-reference has been deprecated - argument
passed by value; If you would like to pass it by reference, modify the
declaration of sscanf(). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true
in your INI file. However, future versions may not support this any
longer. in c:\inetpub\www\xxx\testsscanf.php on line 5
Warning: Call-time pass-by-reference has been deprecated - argument
passed by value; If you would like to pass it by reference, modify the
declaration of sscanf(). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true
in your INI file. However, future versions may not support this any
longer. in c:\inetpub\www\xxx\testsscanf.php on line 5
Warning: Call-time pass-by-reference has been deprecated - argument
passed by value; If you would like to pass it by reference, modify the
declaration of sscanf(). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true
in your INI file. However, future versions may not support this any
longer. in c:\inetpub\www\xxx\testsscanf.php on line 5
Lewis Carroll
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28859&edit=1