diff --git a/appendices/migration70/incompatible/other.xml b/appendices/migration70/incompatible/other.xml index 9f60fcf945..5bcb10b3f2 100644 --- a/appendices/migration70/incompatible/other.xml +++ b/appendices/migration70/incompatible/other.xml @@ -151,7 +151,7 @@ class B { ?> ]]> - &example.outputs.5; + &example.outputs.56; statically from the context of a secondary object). + As of PHP 7.0.0 calling a non-static method statically from an incompatible + context results in $this being undefined inside the method. Calling a + non-static method statically from an incompatible context has been + deprecated as of PHP 5.6.0. As of PHP 7.0.0 calling a non-static method + statically has been generally deprecated (even if called from a compatible + context). Before PHP 5.6.0 such calls already triggered a strict notice. Some examples of the <varname>$this</varname> pseudo-variable + + We're assuming that error_reporting is disabled for this example; + otherwise the following code would trigger deprecated and strict notices, + respectively, depending on the PHP version. + foo(); -// Note: the next line will issue a warning if E_STRICT is enabled. A::foo(); $b = new B(); $b->bar(); -// Note: the next line will issue a warning if E_STRICT is enabled. B::bar(); ?> ]]> - &example.outputs; + &example.outputs.5; + + &example.outputs.7; + +