Wouldn't the challenge in ruby be the prevalence of things you just can't and don't do in PHP? Thinks like instance_eval, class_eval, etc....in Ruby projects I've worked on (and especially in Rails), these are all over the place.<p>Of course, assuming these calls all happen on the front end (source load) and not downstream in response to some triggering event, your approach would probably work.