summaryrefslogtreecommitdiff
path: root/Zend/ZEND_CHANGES
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2004-02-12 14:44:58 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2004-02-12 14:44:58 +0000
commit92f355d73307d56bc8eefb32b2ef5bf29c3e75f7 (patch)
tree42a9685b829c95ce1759e0128d60da8a1741b252 /Zend/ZEND_CHANGES
parent1526710ce17d6dcc72a738a4e3c0ffb8b540d46d (diff)
downloadphp-git-92f355d73307d56bc8eefb32b2ef5bf29c3e75f7.tar.gz
making sure that the provided examples actualy work (or at least do not
generate no parse errors) unless they are really expected to fail
Diffstat (limited to 'Zend/ZEND_CHANGES')
-rw-r--r--Zend/ZEND_CHANGES14
1 files changed, 8 insertions, 6 deletions
diff --git a/Zend/ZEND_CHANGES b/Zend/ZEND_CHANGES
index 2508b8ff3b..696c00578d 100644
--- a/Zend/ZEND_CHANGES
+++ b/Zend/ZEND_CHANGES
@@ -537,7 +537,7 @@ Changes in the Zend Engine 2.0
code would look something like shown below. The comments show the
meaning of each proerty and hence there getter methods. As the code
shows it is possible to read any available information by using the
- getter methods. But since some og the methods are used internally
+ getter methods. But since some of the methods are used internally
they are marked final. All in all the class is very restrictive
because it must be ensured that anything used internally always
works as expected.
@@ -546,7 +546,7 @@ Changes in the Zend Engine 2.0
<?php
class Exception {
- function __construct(string $message=NULL, int code=0) {
+ function __construct(string $message=NULL, int $code=0) {
if (func_num_args()) {
$this->message = $message;
}
@@ -853,9 +853,9 @@ Changes in the Zend Engine 2.0
// matches the following 7 lines with the for directive.
$it = $obj->getIterator();
- for($it->rewind(); $it->hasMore(); $it->next) {
- $key = $it->current();
- $val = $it->key();
+ for($it->rewind(); $it->hasMore(); $it->next()) {
+ $key = $it->key();
+ $val = $it->current();
echo "$key = $val\n";
}
unset($it);
@@ -900,9 +900,10 @@ Changes in the Zend Engine 2.0
class Foo {
function __toString() {
return "What ever";
+ }
}
- $obj = Foo;
+ $obj = new Foo;
$str = (string) $obj; // call __toString()
@@ -933,6 +934,7 @@ Changes in the Zend Engine 2.0
public $prop;
function Func($name) {
echo "Hello $name";
+ }
}
reflection_class::export('Foo');