3 ms·
Pretty mingtastic API for a first attempt, it's not safe, and is sure to suck performance wise, since all interaction must involve parsing an expression, and co
by forgotusername 15y ago
Pretty mingtastic API for a first attempt, it's not safe, and is sure to suck performance wise, since all interaction must involve parsing an expression, and coercing any return value back to a PHP type, and with no way to maintain references to native JS objects.
I wouldn't object so much if only the PHP community weren't already known for their tendency to take a bad situation and make it worse: can't we learn from the history of mysql_query() and friends? Decades of SQL injections! There's no reason they couldn't provide a nice "JsObject" type supporting __call() and __get() to allow integration without resorting to interpolating bits of JavaScript code with (probably originating from a user) data, this way at least web developers would be safer from themselves.