Hi! > The issue, as you well know, is that references disable copy-on-write. Thus > assume you have code like this: > > function with_ref(&$a) { > count ($a); > } > > function no_ref($a) { > count($a); > } > > The count in with_ref() will copy the array, while no_ref() can use copy on > write and won't actually copy.
Yes, this is an issue, and it'd be good to find a way to solve it. At least for count() and other "pure" (however pure can it be in PHP) functions it seems possible. But do not think "not using references ever" qualifies as a solution :) -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php