title: Is it possible to have a callback for a undefined object?
body: <p>Is it possible to define a function that get's called when a object isn't defined? So I can do <code>$makeUpOntheFlyObjectNames-&gt;something();</code> in the function get the object name, and the function name and a array of it's arguments, or a empty array if it has none. For what it was trying to call? Had an idea to make stuff like <code>$varName-&gt;length();</code> work in V5.x for strings and stuff. Was trying to Google this but was getting stuff like <code>class_exists</code> and stuff back, so figured a human would have a better answer. But I don't think it's possible, just wanted to check here to be sure.</p>
  
  <p>So if the object wasn't found, and was calling length, check if it's a string and then return the result of strlen, else if it's not a string emulate php's own error.. Just some idea I had, but not sure if the first part of detection is even possible.</p>