From: wetstreams at yahoo dot com Operating system: windows 2000 PHP version: 4.3.7 PHP Bug Type: Scripting Engine problem Bug description: sscanf optional parameters causes warning
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 bug report at http://bugs.php.net/?id=28859&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28859&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28859&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28859&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28859&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28859&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28859&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28859&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28859&r=support Expected behavior: http://bugs.php.net/fix.php?id=28859&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28859&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28859&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28859&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28859&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28859&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28859&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28859&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28859&r=float
