cvs: phpweb / zend-engine-2.php

From: Date: Wed, 25 Jun 2003 04:46:04 +0000
Subject: cvs: phpweb / zend-engine-2.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-18930@lists.php.net to get a copy of this message
sterling Wed Jun 25 00:46:04 2003 EDT Modified files: /phpweb zend-engine-2.php Log: pretty syntax higlighting good Index: phpweb/zend-engine-2.php diff -u phpweb/zend-engine-2.php:1.3 phpweb/zend-engine-2.php:1.4 --- phpweb/zend-engine-2.php:1.3 Tue Jun 24 23:43:56 2003 +++ phpweb/zend-engine-2.php Wed Jun 25 00:46:04 2003 @@ -1,8 +1,9 @@ <?php require_once 'prepend.inc'; -commonHeader("Changes in Zend Engine 2.0", 1); +commonHeader("Changes in PHP5/Zend Engine 2.0", 1); ?> +<h1>Changes in PHP5/Zend Engine 2.0</h1> <h2>New Object Model.</h2> <p> PHP's handling of objects has been completely rewritten, allowing for better performance and more @@ -196,20 +197,24 @@ </p> <p> <?php -highlight_string('function foo(ClassName $object) { +highlight_string('<?php +function foo(ClassName $object) { // ... -}'); +} +?>'); ?> <p> is equivalent to: </p> <p> <?php -highlight_string('function foo($object) { +highlight_string('<?php +function foo($object) { if (!($object instanceof ClassName)) { die("Argument 1 must be an instance of ClassName"); } -}'); ?> +} +?>'); ?> </p> <p> This syntax only applies to objects/classes, not built-in types. @@ -222,11 +227,13 @@ </p> <h3>Example</h3> <p> -<?php highlight_string('class Foo { +<?php highlight_string('<?php +class Foo { final function bar() { // ... } -}'); ?> +} +?>'); ?> <p> Old code that has no user-defined classes or functions named 'final' should run without modifications. @@ -250,7 +257,9 @@ An object copy is created by calling the object's <code>__clone()</code> method: </p> <p> -<?php highlight_string('$copy_of_object = $object->__clone();'); ?> +<?php highlight_string('<?php +$copy_of_object = $object->__clone(); +?>'); ?> </p> <p> When the developer asks to create a new copy of an object, the Zend Engine will check if a

« previous php.mirrors (#18930) next »