PHP Classes

phpizer: Load and adapt class to current PHP version (3.x+)

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 326 All time: 7,186 This week: 49Up
Version License PHP version Categories
phpizer 2.0GNU General Publi...3.0Language
Description 

Author

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.

I'm working on a FIX to the CON :-)

Innovation Award
PHP Programming Innovation award nominee
November 2006
Number 3


Prize: One book of choice by Packt
PHP has evolved a lot over the time. The way certain things can be done has changed according to the PHP version.

This class uses Aspect Oriented Programming principles to adapt PHP code according to the PHP version in use.

It provides means to add or remove different code sections depending on the PHP version that is running. This makes possible to write code that takes the most of the latest PHP versions, while it still runs on older versions.

Manuel Lemos
Picture of Asher Wolfstein
  Performance   Level  
Name: Asher Wolfstein <contact>
Classes: 15 packages by
Country: United States United States
Age: 41
All time rank: 1121166 in United States United States
Week rank: 195 Up19 in United States United States Up
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files (8)  
File Role Description
Plain text file phpizer.class.php Class Main Class
Plain text file phpizer.class5.php Class Main Class for PHP5
Accessible without login Plain text file phpizer.define.php Conf. Required Constant Definitions
Accessible without login Plain text file phpizer.proc.php Aux. Equiv. Procedures for PHP3
Accessible without login Plain text file phpizer.test.php Example Example / Test Script 1
Accessible without login Plain text file phpizer.test2.php Example Example / Test Script 2
Plain text file stack.class.php Class Test 2 File Include
Plain text file vtest_include.class.php Class Test Include File 1

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:326
This week:0
All time:7,186
This week:49Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1782