_base =& $base; if ($this->_base->getVar("foo")) { $this->_foo = $this->_base->getVar("foo"); } else { die("foo was not defined\n"); } } } class exampleBase { var $_parameters; var $_plugins; var $_pluginsByName; function exampleBase ($parameters) { $this->_parameters = array(); foreach ($parameters as $paramName => $paramValue) { $this->setVar($paramName, $paramValue); } $this->_plugins = array(); $this->_pluginsByName = array(); $plugin =& new examplePlugin($this); $this->_plugins[] =& $plugin; $this->_pluginsByName["examplePlugin"] =& $plugin; } function setVar ($key, $value) { $this->_parameters[$key] = $value; } function getVar ($key) { return $this->_parameters[$key]; } } print("Start\n"); $PARAMETERS = array("foo" => "bar"); for ($i = 0; $i < 10000000 + 10; $i++) { if ($i % 10000 == 0 || $i > 32760) print("Middle: {$i}\n"); new exampleBase($PARAMETERS); } print("End\n"); ?>