php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28052 php5 undefined function aggregate()
Submitted: 2004-04-19 04:34 UTC Modified: 2004-09-11 00:10 UTC
From: daemorhedron at siliconjesters dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.0.0RC1 OS: mdk 9.2 and win xp
Private report: No CVE-ID: None
 [2004-04-19 04:34 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-19 09:12 UTC] derick@php.net
PHP 5 no longer supports object aggregation, there are plenty of other mechanisms to use.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 09:01:30 2024 UTC