Doc #72462 [Csd]: documentation about static calls from secondary object is outdated

From: Date: Tue, 21 Jun 2016 14:41:54 +0000
Subject: Doc #72462 [Csd]: documentation about static calls from secondary object is outdated
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13570@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72462&edit=1 ID: 72462 User updated by: info at developiu dot it Reported by: info at developiu dot it Summary: documentation about static calls from secondary object is outdated Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: centos linux PHP Version: 7.0.7 Assigned To: cmb Block user comment: N Private report: N New Comment: Thank you for the fast fix. have a nice day Previous Comments: ------------------------------------------------------------------------ [2016-06-21 14:40:09] cmb@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. ------------------------------------------------------------------------ [2016-06-21 14:38:52] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=339436 Log: Fix #72462: documentation about static calls from secondary object is outdated ------------------------------------------------------------------------ [2016-06-21 06:16:04] info at developiu dot it Description: ------------ http://php.net/manual/en/language.oop5.basic.php says: "The pseudo-variable $this is available when a method is called from within an object context. $this is a reference to the calling object (usually the object to which the method belongs, but possibly another object, if the method is called statically from the context of a secondary object)." Immediately after that, a test script ("Example 2") is given with expected output. In php 7 the value of this is set to null when calling statically from a secondary object (see http://php.net/manual/en/migration70.incompatible.php, section "Calls from incompatible context removed"), this documentation is now outdated.In fact, if I run the script "Example 2" I do not get the results expected in the documentation. my php version: [cesco@localhost ~]$ php --version PHP 7.0.7 (cli) (built: May 28 2016 07:53:22) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans have a nice day Francesco ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72462&edit=1

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