Doc #80727 [Asn->Csd]: [ES] Mistake in documentation example code

From: Date: Sat, 20 Mar 2021 02:01:40 +0000
Subject: Doc #80727 [Asn->Csd]: [ES] Mistake in documentation example code
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18661@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80727&edit=1 ID: 80727 Updated by: julionc@php.net Reported by: pablo dot lorenzo at gmail dot com Summary: [ES] Mistake in documentation example code -Status: Assigned +Status: Closed Type: Documentation Problem Package: Translation problem Operating System: irrelevant PHP Version: 7.4.15 Assigned To: julionc Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2021-02-10 13:11:17] 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); } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80727&edit=1

« previous php.doc.bugs (#18661) next »