hojtsy Messages: 241 Registered: January 2006 Location: Budapest, Hungary
Experienced Member
I can not find any errors in that one. But it is still very tricky I think there are some practical problems with writing tricky code like this.
problem 1: by looking at the code it is quite much non-obvious if the intention was to replace two double quotes with one double quote, or it is just an unintentional side effect/bug. The code lacks expresiveness to human readers.
problem 2: calling a variable "exec" is nasty. exec is a function in the C standard library, and even tough it is valid to create a variable with the same name, it bewilders readers, and requires much more attention from them. I think this could be easily avoided.