Is there something like a macro in PHP? Or: How to make an own include function?
<p>What I want to do is this:</p>

<p>When I write a class and the class instantiates another class, I want to import that class with an require_once. Just the way I do so in Objective-C. But instead of using plain require_once function and messing around with paths and string concatenation, I would prefer something like:</p>

<pre><code>importClass('myclass');
</code></pre>

<p>but I'm afraid that it's impossible to write a function that will include code. If I would do that in the importClass() function, I would include the class code into the implementation block of the function, which of course is nonsense. So what options do I have here?</p>
