mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Made class constants uppercase in examples
Fixed return type of mysqli::$client_version git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330913 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0a7509b835
commit
57af376c5f
2 changed files with 7 additions and 7 deletions
|
@ -28,22 +28,22 @@
|
|||
<?php
|
||||
class MyClass
|
||||
{
|
||||
const constant = 'constant value';
|
||||
const CONSTANT = 'constant value';
|
||||
|
||||
function showConstant() {
|
||||
echo self::constant . "\n";
|
||||
echo self::CONSTANT . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo MyClass::constant . "\n";
|
||||
echo MyClass::CONSTANT . "\n";
|
||||
|
||||
$classname = "MyClass";
|
||||
echo $classname::constant . "\n"; // As of PHP 5.3.0
|
||||
echo $classname::CONSTANT . "\n"; // As of PHP 5.3.0
|
||||
|
||||
$class = new MyClass();
|
||||
$class->showConstant();
|
||||
|
||||
echo $class::constant."\n"; // As of PHP 5.3.0
|
||||
echo $class::CONSTANT."\n"; // As of PHP 5.3.0
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -56,7 +56,7 @@ echo $class::constant."\n"; // As of PHP 5.3.0
|
|||
<?php
|
||||
class foo {
|
||||
// As of PHP 5.3.0
|
||||
const bar = <<<'EOT'
|
||||
const BAR = <<<'EOT'
|
||||
bar
|
||||
EOT;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<refnamediv>
|
||||
<refname>mysqli_get_client_version</refname>
|
||||
<refname>mysqli::$client_version</refname>
|
||||
<refpurpose>Returns the MySQL client version as a string</refpurpose>
|
||||
<refpurpose>Returns the MySQL client version as an integer</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
|
|
Loading…
Reference in a new issue