ID: 28052
Comment by: php at soapi dot com
Reported By: daemorhedron at siliconjesters dot com
Status: Bogus
Bug Type: Class/Object related
Operating System: mdk 9.2 and win xp
PHP Version: 5.0.0RC1
New Comment:
In that case, what are we supposed to use? What do Zend recommend as
the best alternative to aggregate? I use aggregate extensively in my
code, and I was suprised that it is not part of PHP5. This does not
seem to have been mentioned in the documentation - rather, it seems to
imply that aggregate functions were added for forwarf-compatibility
with PHP5.
So please, enlighten us, what do you recommend we do instead?
Previous Comments:
------------------------------------------------------------------------
[2004-07-14 14:10:59] php at soapi dot com
In that case, what are we supposed to use? What do Zend recommend as
the best alternative to aggregate? I use aggregate extensively in my
code, and I was suprised that it is not part of PHP5. This does not
seem to have been mentioned in the documentation - rather, it seems to
imply that aggregate functions were added for forwarf-compatibility
with PHP5.
So please, enlighten us, what do you recommend we do instead?
------------------------------------------------------------------------
[2004-04-19 09:12:20] [EMAIL PROTECTED]
PHP 5 no longer supports object aggregation, there are plenty of other
mechanisms to use.
------------------------------------------------------------------------
[2004-04-19 04:34:15] daemorhedron at siliconjesters dot com
Description:
------------
Whenever trying to use aggregate() under php5b3, b4 or rc1, I just get
Fatal error: Call to undefined function aggregate() in /dir/file on
line 666
The above code works fine on php4 of various types. I've searched
bugs.php.net, news.php.net and google to no avail and wondering how to
proceed from here. Is there a required configure switch to enable
aggregation in php5? Since it doesn't produce an actual error, I've not
provided a gdb backtrace.
** CONFIGURE LINE **
./configure --with-config-file-path=/usr/local/apache2/conf
--with-apxs2=/usr/local/apache2/bin/apxs --enable-session
--enable-pcntl --with-mm=/usr/local/lib --enable-exif
--with-gd=/usr/include --with-jpeg --with-jpeg-dir=/usr/lib --with-png
--with-png-dir=/usr/lib --with-freetype --with-freetype-dir=/usr/lib
--with-mcrypt --with-opensl --with-pspell --with-gdbm --enable-dbx
--with-mysql=/usr/local/mysql --with-sqlite --with-gmp --enable-bcmath
--with-zlib --with-bz2 --enable-ftp --enable-sockets --with-xml-rpc
--with-xsl --with-java --without-pear --disable-cli
Tried with php5b3, b4 and rc1 on both apache 1.x and 2.x, and on both
windows xp, and mandrake 9.2 (whew). I'll be happy to post any relevant
information required, TIA.
Reproduce code:
---------------
class cybernetics {
function augment() {
echo "cybernetics added....release the winged monkeys!\n";
}
}
class monkeys {
function monkeys() {
echo "monkeys loaded\n";
echo "loading cybernetics...\n";
aggregate(&$this,'cybernetics');
$this->augment();
}
}
$monkeys=&new monkeys();
Expected result:
----------------
Should output :
monkeys loaded
loading cybernetics...
cybernetics added....release the winged monkeys!
Actual result:
--------------
monkeys loaded
loading cybernetics...
Fatal error: Call to undefined function aggregate() in
/dir/file on line 12
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28052&edit=1