On Wed, June 7, 2006 8:56 am, Ilia Alshanetsky wrote:
> When it comes to "empty" clone statements, should they be executed
> and then free the result (current behavior) or avoid clone all
> together.
> For example when class x { function __clone() { echo "hello"; } }
> clone new x(); code is execut
Hello Ilia,
hello should be printed. As in you cannot outsmart what some people
might do in their code. For example in C++ such stuff gets optimized
out but only as long as the compiler detects that doing so does not
result in a different bahvior. This is something you need to know
for particula
I think that "hello" should be printed. Even if the result of clone()ing
isn't going to be used, the side-effects should always occur (at least to be
consistence). I would bet that other languages would do the same.
Nuno
- Original Message -
When it comes to "empty" clone statements,
When it comes to "empty" clone statements, should they be executed
and then free the result (current behavior) or avoid clone all together.
For example when class x { function __clone() { echo "hello"; } }
clone new x(); code is executed, should it print hello or not print
anything at all, tr