Language: phpizer Asher Wolfstein (contact me)
This class can be used to load and adapt a class according to the PHP version that is currently running.
It loads a given class script file and preprocess the code to make PHP version dependent adjustments.
It looks for special tags of the form %PHP# in comments of the class file to load. If the number in # matches the current PHP version, the lines are uncommented.
Version 2 now has tighter version control including ranges, as well as automatic variable globalization outside of classes and functions.
PROS: you can put if clause like structures into parts of your script otherwise inaccessible.
CONS: debugging loses effectiveness when errors occur. PHP locates all errors of included files in the eval statement.