Is it possible to switch in PHP based on version?
<p>I have a function in one of my PHP scripts that relies on version 5.3 to run.</p>

<p>I thought that if it was in a function that didn't happen to get called when run on a server with PHP 5.2 or earlier, then it would just be ignored. However, it turns out that when that script, and the class inside it, even just gets included, then PHP bails and stops executing.</p>

<p>If I can avoid it, I'd like to not have to branch of different versions of my scripts dedicated to different PHP versions. Instead, it would be ideal to be able to have code that says "If PHP version 5.3, then do this, if less, then do something different."</p>

<p>I'Ve looked for some kind of "version switch" in the PHP manual, but didn't see one.</p>

<p>Is a switch function like I'm describing possible?</p>
