Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

68 users online



Which PHP version

Which PHP version

Currently viewing this thread: 1 (0 members and 1 guests)


killa_kid

killa_kid

Status: Offline!

Which PHP version

I am making a news script and I was wondering if anyone knew of a program that will go through a php file and look at all the functions used and check what PHP version is necessary.

IE:

not_real.php contains:

PHP:


<?php
    getimagesize
("http://made.up/file/img.jpg");
    
array_rand($some_array2);
?>

getimagesize() would make the program set the required php version at 3, but array_rand() would change it to php version 4.

and just so you know i searched google and this forum but couldn't find anything to help me

Thanks in advance!!

___________________

ProBB - The Best Thing to Happen to BBs Since YaBB

Adam

Adam

Status: Offline!

$V = preg_replace('/[a-zA-Z\.]/','',phpversion());

deal with $V how you want.

___________________


Current Project: LivermoreMuscle.com
Sig Hosted by Motorspin

CDude

CDude

nothing
Status: Offline!

if ( !function_exists ( 'array_rand' ) )
{
function array_rand ( )...

___________________

http://celerondude.com

killa_kid

killa_kid

Status: Offline!
Quote:

Originally posted by CDude
if ( !function_exists ( 'array_rand' ) )
{
function array_rand ( )...

That was just a random function i through in to expllain

i forgot to clarify something. I want this so i can tell anybody who downloads my system what the earliest version of php (where every function is in) they will need

___________________

ProBB - The Best Thing to Happen to BBs Since YaBB

CDude

CDude

nothing
Status: Offline!

that's easy, pick the newest function you use and that will be the requirement.

___________________

http://celerondude.com

killa_kid

killa_kid

Status: Offline!
Quote:

Originally posted by CDude
that's easy, pick the newest function you use and that will be the requirement.

The point of the program I am asking about is to do just that

I dont really feel like going through 40 files and make a list of every single function and then check php.net for each function

___________________

ProBB - The Best Thing to Happen to BBs Since YaBB

CDude

CDude

nothing
Status: Offline!

You can already guess based on your experience with PHP. It's better to set a base version and work from there. Spend more time on the script and less time with useless problems.

___________________

http://celerondude.com

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0081 seconds.