mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
bugfix #28859
Call-time pass-by-reference has been deprecated git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@161846 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
956a0e9c2d
commit
17c0ff93b4
1 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.33 -->
|
||||
<refentry id="function.sscanf">
|
||||
<refnamediv>
|
||||
|
@ -46,8 +46,7 @@ echo "Item $serial was manufactured on: $year-" . substr($month, 0, 3) . "-$day\
|
|||
</programlisting>
|
||||
</example>
|
||||
If optional parameters are passed, the function will return the
|
||||
number of assigned values. The optional parameters must be passed
|
||||
by reference.
|
||||
number of assigned values.
|
||||
<example>
|
||||
<title><function>sscanf</function> - using optional parameters</title>
|
||||
<programlisting role="php">
|
||||
|
@ -55,7 +54,7 @@ echo "Item $serial was manufactured on: $year-" . substr($month, 0, 3) . "-$day\
|
|||
<?php
|
||||
// get author info and generate DocBook entry
|
||||
$auth = "24\tLewis Carroll";
|
||||
$n = sscanf($auth, "%d\t%s %s", &$id, &$first, &$last);
|
||||
$n = sscanf($auth, "%d\t%s %s", $id, $first, $last);
|
||||
echo "<author id='$id'>
|
||||
<firstname>$first</firstname>
|
||||
<surname>$last</surname>
|
||||
|
|
Loading…
Reference in a new issue