php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80727 [ES] Mistake in documentation example code
Submitted: 2021-02-10 13:11 UTC Modified: 2021-03-20 01:58 UTC
From: pablo dot lorenzo at gmail dot com Assigned: julionc (profile)
Status: Closed Package: Translation problem
PHP Version: 7.4.15 OS: irrelevant
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: pablo dot lorenzo at gmail dot com
New email:
PHP Version: OS:

 

 [2021-02-10 13:11 UTC] pablo dot lorenzo at gmail dot com
Description:
------------
---
From manual page: https://php.net/language.oop5.variance
---

This is just for the Spanish documentation page.

The section "Contravarianza" contains an example that has a small mistake, but it is a mistake that changes completely the interpretation of the example and also would not work as expected.

This method:

    public function eat(Food $food)
    {
        echo $this->name . " eats " . get_class($food);
    }

Should be:

    public function eat(AnimalFood $food)
    {
        echo $this->name . " eats " . get_class($food);
    }




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-10 13:28 UTC] cmb@php.net
-Summary: Mistake in Spanish documentation example code +Summary: [EN] Mistake in documentation example code -Package: Documentation problem +Package: Translation problem
 [2021-02-10 13:28 UTC] cmb@php.net
-Summary: [EN] Mistake in documentation example code +Summary: [ES] Mistake in documentation example code
 [2021-03-20 01:58 UTC] julionc@php.net
-Assigned To: +Assigned To: julionc
 [2021-03-20 02:01 UTC] julionc@php.net
Automatic comment on behalf of julionc
Revision: http://git.php.net/?p=doc/es.git;a=commit;h=03e620182a96588b24de0f163d5daa56b8b04151
Log: Fix #80727 [ES] Mistake in documentation example code
 [2021-03-20 02:01 UTC] julionc@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 05:01:29 2024 UTC