ID:               28859
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wetstreams at yahoo dot com
 Status:           Open
-Bug Type:         Scripting Engine problem
+Bug Type:         Documentation problem
 Operating System: windows 2000
 PHP Version:      4.3.7
 New Comment:

This is a simple documentation problem.  The &'s should be removed from
that example.


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to