Doc #72462 [NEW]: documentation about static calls from secondary object is outdated
| From: | info at developiu dot it | Date: | Tue, 21 Jun 2016 06:16:08 +0000 |
| Subject: | Doc #72462 [NEW]: documentation about static calls from secondary object is outdated | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-13566@lists.php.net to get a copy of this message | ||
From: info at developiu dot it
Operating system: centos linux
PHP version: 7.0.7
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:documentation about static calls from secondary object is outdated
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 bug report at https://bugs.php.net/bug.php?id=72462&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72462&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72462&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72462&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72462&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72462&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72462&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72462&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72462&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72462&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72462&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72462&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72462&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72462&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72462&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72462&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72462&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72462&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72462&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72462&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72462&r=mysqlcfg