php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54336 [pt_BR] wrong variables
Submitted: 2011-03-21 14:51 UTC Modified: 2011-03-22 09:39 UTC
From: fabio dot system at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: Translation problem
PHP Version: 5.3.6 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabio dot system at gmail dot com
New email:
PHP Version: OS:

 

 [2011-03-21 14:51 UTC] fabio dot system at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.arsort#Exemplos
---

The variable $fruits isn't declared. $frutas must be used.
The variables $key and $val are wrong too.


<?php
$frutas = array("d" => "limao", "a" => "laranja", "b" => "banana", "c" => 
"melancia");
arsort($frutas);
foreach ($fruits as $key => $val) {
    echo "$chave = $valor\n";
}
?>

Test script:
---------------
<?php
$frutas = array("d" => "limao", "a" => "laranja", "b" => "banana", "c" => 
"melancia");
arsort($frutas);
foreach ($fruits as $key => $val) {
    echo "$chave = $valor\n";
}
?>

Expected result:
----------------
<?php
$frutas = array("d" => "limao", "a" => "laranja", "b" => "banana", "c" => 
"melancia");
arsort($frutas);
foreach ($frutas as $chave => $valor) {
    echo "$chave = $valor\n";
}
?>

Actual result:
--------------
""

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-22 09:38 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=309538
Log: Fix doc bug #54336 (wrong variables).
 [2011-03-22 09:39 UTC] aharvey@php.net
-Summary: wrong variables +Summary: [pt_BR] wrong variables -Status: Open +Status: Closed -Package: Documentation problem +Package: Translation problem -Assigned To: +Assigned To: aharvey
 [2011-03-22 09:39 UTC] aharvey@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-2025 The PHP Group
All rights reserved.
Last updated: Thu Mar 13 19:01:31 2025 UTC