Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord for CodeIgniter: Rails-style model interactions

[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 Smile

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...


Messages In This Thread
ActiveRecord for CodeIgniter: Rails-style model interactions - by El Forum - 05-28-2008, 02:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB