Requir Class

Test your script Requirements easly. Simple, fast and extensible...

Example Code


array(
    'title' => 'PHP Version',
    'msg'   => 'PHP version must be equal 5.0',
    'status'=> PHP::Version('5.0','=')
),

array(
    'title' => 'Server OS',
    'msg'   => 'Your server must be "Linux"',
    'status'=> ENV::isLinux()
),

array(
    'title' => 'is cache folder writable?',
    'msg'   => '"cache" folder must be writable',
    'status'=> FILE::isWritable('./cache')
),

array(
    'title' => 'cURL Extension',
    'msg'   => 'It would be better if "cURL" extension is loaded.',
    'status'=> EXT::Loaded('cURL')
),

array(
    'title' => 'myNewFunction()',
    'msg'   => 'myNewFunction() not exists!',
    'status'=> FUNC::Exists('myNewFunction')
),

array(
    'title' => 'Error Reporting',
    'msg'   => 'It would be better if "error reporting" disabled!',
    'status'=> INI::Option('error_reporting') == 0
),

array(
    'title' => 'Server Software',
    'msg'   => $_SERVER['SERVER_SOFTWARE']
)
For details of class usage, please look at the documentation.

Statics

Result

PHP Version = 5.0
PHP version must be equal 5.0
Server OS
Passed
is cache folder writable?
Passed
cURL Extension
Passed
myNewFunction()
myNewFunction() not exists!
Error Reporting
Passed
Server Software
LiteSpeed