mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix #43881 (Specify the version in the example)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@250808 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ebcf4708d7
commit
8d41f6f315
3 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<sect1 xml:id="language.oop5.constants" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>Class Constants</title>
|
||||
<para>
|
||||
|
@ -35,7 +35,7 @@ class MyClass
|
|||
echo MyClass::constant . "\n";
|
||||
|
||||
$classname = "MyClass";
|
||||
echo $classname::constant . "\n";
|
||||
echo $classname::constant . "\n"; // As of PHP 5.3.0
|
||||
|
||||
$class = new MyClass();
|
||||
$class->showConstant();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<sect1 xml:id="language.oop5.paamayim-nekudotayim" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>Scope Resolution Operator (::)</title>
|
||||
|
||||
|
@ -39,7 +39,7 @@ class MyClass {
|
|||
}
|
||||
|
||||
$classname = 'MyClass';
|
||||
echo $classname::CONST_VALUE;
|
||||
echo $classname::CONST_VALUE; // As of PHP 5.3.0
|
||||
|
||||
echo MyClass::CONST_VALUE;
|
||||
?>
|
||||
|
@ -68,7 +68,7 @@ class OtherClass extends MyClass
|
|||
}
|
||||
|
||||
$classname = 'OtherClass';
|
||||
echo $classname::doubleColon();
|
||||
echo $classname::doubleColon(); // As of PHP 5.3.0
|
||||
|
||||
OtherClass::doubleColon();
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<sect1 xml:id="language.oop5.static" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>Static Keyword</title>
|
||||
|
||||
|
@ -68,7 +68,7 @@ print $foo->my_static . "\n"; // Undefined "Property" my_static
|
|||
|
||||
print $foo::$my_static . "\n";
|
||||
$classname = 'Foo';
|
||||
print $classname::$my_static . "\n";
|
||||
print $classname::$my_static . "\n"; // As of PHP 5.3.0
|
||||
|
||||
print Bar::$my_static . "\n";
|
||||
$bar = new Bar();
|
||||
|
@ -91,7 +91,7 @@ class Foo {
|
|||
|
||||
Foo::aStaticMethod();
|
||||
$classname = 'Foo';
|
||||
$classname::aStaticMethod();
|
||||
$classname::aStaticMethod(); // As of PHP 5.3.0
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue