Login   Register  
PHP Classes
elePHPant
Icontem

File: Versioning/example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Asher Wolfstein  >  Platform versioning  >  Versioning/example.php  >  Download  
File: Versioning/example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: Platform versioning
Check and compare the current PHP version
Author: By
Last change: added var_dumps
Date: 2007-07-01 20:27
Size: 845 bytes
 

Contents

Class file image Download
<?php

$v 
phpversion();
if ( 
intvalsubstr$v0) ) >= ) {
    require_once( 
'class5.php' );
    
var_dumpPlatform_versioning_v5::compare_versions'5.1.0''>=' ) );
    
var_dumpPlatform_versioning_v5::compare_versions'5.2''<' ) );
    
var_dumpPlatform_versioning_v5::compare_versions'4.3''<=' ) );
} elseif ( 
substr$v0) == '4' ) {
    require_once( 
'class.php' );
    
var_dumpPlatform_versioning::compare_versions'5.1.0''>=' ) );
    
var_dumpPlatform_versioning::compare_versions'5.2''<' ) );
    
var_dumpPlatform_versioning::compare_versions'4.3''<=' ) );
} else {
    require_once( 
'proc.php' );
    
var_dumpplatform_versioning_compare_versions'5.1.0''<' ) );
    
var_dumpplatform_versioning_compare_versions'4.3''>' ) );
    
var_dumpplatform_versioning_compare_versions'3.0''>=' ) );
}

?>