[eluser]Unknown[/eluser]
[quote author="chromice" date="1193310405"]I wonder why there are so many eval(...) statements in this library? Is it to tackle bugs in some version of PHP5 or something?
For instance:
Code:
eval('return $this->' . $method . ';');
and
Code:
return $this->$method;
or even
Code:
eval('$return = new ' . $this->_class_name . '();');
and
Code:
$return = new $this->_class_name();
work the same, while eval version is somewhat slower and less readable?
Am I missing something?[/quote]
was there ever a reply to this question? i couldn't find anything browsing through this thread.
thanks all
EDIT: actually i noticed a spot where using eval() could be a problem. line 123 reads:
Code:
eval('$return->' . $key . ' = "' . $value . '";');
if $value contains quotes, this could generate an error, i think...