From 73c63fec9345b0e43469d793889759dd042a56f5 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Sun, 11 Nov 2001 10:16:38 +0000 Subject: [PATCH] Some more overload work, adding configure option git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@61959 c90b9560-bf6c-de11-be94-00142212c4b1 --- chapters/install.xml | 16 +++++++++++++++- functions/overload.xml | 23 +++++++++++++---------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/chapters/install.xml b/chapters/install.xml index fa61343ba0..5d120e21f3 100644 --- a/chapters/install.xml +++ b/chapters/install.xml @@ -1,5 +1,5 @@ - + Installation @@ -2461,6 +2461,20 @@ $ /usr/local/sbin/php4-enable + + + + --enable-overload + + + + PHP 3: Option not available in PHP 3 + + + PHP 4: Enable object property and method call overloading support. + + + diff --git a/functions/overload.xml b/functions/overload.xml index 7acb42b555..6ded7e1c11 100644 --- a/functions/overload.xml +++ b/functions/overload.xml @@ -1,5 +1,5 @@ - + Object property and method call overloading Object overloading @@ -65,6 +65,7 @@ print "\$o->d: $o->d\n"; // print: $o->d: $o->x = 56; // instantiate stdclass (it is built-in in PHP 4) +// $val is not overloaded! $val = new stdclass; $val->prop = 555; @@ -78,15 +79,17 @@ var_dump($o->a[0]->prop); - - As this is an experimental extension, not all things - work. There is no __call() support - currently, you can only overload the get and set - operations for properties. You cannot invoke the - original overloading handlers of the class, and - __set() only works to one level - of property access. - + + + As this is an experimental extension, not all things + work. There is no __call() support + currently, you can only overload the get and set + operations for properties. You cannot invoke the + original overloading handlers of the class, and + __set() only works to one level + of property access. + +