On Wed, April 25, 2007 1:43 pm, Mauro N. Infantino wrote: > definitions are taking more time in PHP5.2.x. The problem I'm facing > is that > I'm trying to benchmark this, but I'm not being able because I can not > find > the way to iterate this case enough times to get a significant number. > eval()'d code could be an option, but I don't know if the class > definition > inside eval()'d code follows the same process. Is there a way to > achieve > this? Is it possible class definitions are taking more time (twice) > than > before?
<?php $file = fopen('/tmp/foo', 'w'); //or whatever. for ($i = 0; $i < 1000000; $i++){ $class = <<<EOC class foo_$i { //more stuff here }; EOC; fwrite($file, $class); } fclose($file); //start timer require '/tmp/foo'; //end timer ?> "Crude, but effective Captain." -- Spock -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php