cvs: ZendEngine2 / ZEND_CHANGES php-src README.PHP4-TO-PHP5-THIN-CHANGES

From: Date: Thu, 12 Feb 2004 14:44:58 +0000
Subject: cvs: ZendEngine2 / ZEND_CHANGES php-src README.PHP4-TO-PHP5-THIN-CHANGES
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2371@lists.php.net to get a copy of this message
hholzgra Thu Feb 12 09:44:58 2004 EDT Modified files: /php-src README.PHP4-TO-PHP5-THIN-CHANGES /ZendEngine2 ZEND_CHANGES Log: making sure that the provided examples actualy work (or at least do not generate no parse errors) unless they are really expected to fail http://cvs.php.net/diff.php/php-src/README.PHP4-TO-PHP5-THIN-CHANGES?r1=1.14&r2=1.15&ty=u Index: php-src/README.PHP4-TO-PHP5-THIN-CHANGES diff -u php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.14 php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.15 --- php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.14 Sun Feb 8 17:49:47 2004 +++ php-src/README.PHP4-TO-PHP5-THIN-CHANGES Thu Feb 12 09:44:58 2004 @@ -56,10 +56,10 @@ 8. Classes must be declared before used: <?php $test = new fubar(); - $test->echo(); + $test->barfu(); class fubar { - function echo() { + function barfu() { echo 'fubar'; } } http://cvs.php.net/diff.php/ZendEngine2/ZEND_CHANGES?r1=1.76&r2=1.77&ty=u Index: ZendEngine2/ZEND_CHANGES diff -u ZendEngine2/ZEND_CHANGES:1.76 ZendEngine2/ZEND_CHANGES:1.77 --- ZendEngine2/ZEND_CHANGES:1.76 Wed Feb 11 17:42:53 2004 +++ ZendEngine2/ZEND_CHANGES Thu Feb 12 09:44:58 2004 @@ -537,7 +537,7 @@ 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 @@ <?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 @@ // 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 @@ class Foo { function __toString() { return "What ever"; + } } - $obj = Foo; + $obj = new Foo; $str = (string) $obj; // call __toString() @@ -933,6 +934,7 @@ public $prop; function Func($name) { echo "Hello $name"; + } } reflection_class::export('Foo');

« previous php.zend-engine.cvs (#2371) next »