473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Minimum source version checker

Hi everyone,

I get to to see a lot of code that doesn't work on older versions of PHP
and it can be really time consuming to write work-arounds for the latest
functions.

So...I was wondering if some sort of source version checker exists that
can parse those scripts and tell me the minimum required version of PHP
to run them.

I apologize if this question has been asked a thousand times before, but
my friend Google doesn't seem to be very helpful in providing an answer.

Thanks for your time.

--Stephan.

Jul 17 '05 #1
2 2331
Stephan van Loendersloot <wh***********@worldonline.nl> wrote:
I get to to see a lot of code that doesn't work on older versions of PHP
and it can be really time consuming to write work-arounds for the latest
functions.
So...I was wondering if some sort of source version checker exists that
can parse those scripts and tell me the minimum required version of PHP
to run them.
I apologize if this question has been asked a thousand times before, but
my friend Google doesn't seem to be very helpful in providing an answer.


Try this: http://pl2.php.net/register_globals

--
http://www.partybitchez.org/
Jul 17 '05 #2
Stephan van Loendersloot <wh***********@worldonline.nl> wrote in message news:<bs**********@news1.tilbu1.nb.home.nl>...
Hi everyone,

I get to to see a lot of code that doesn't work on older versions of PHP
and it can be really time consuming to write work-arounds for the latest
functions.

So...I was wondering if some sort of source version checker exists that
can parse those scripts and tell me the minimum required version of PHP
to run them.

I apologize if this question has been asked a thousand times before, but
my friend Google doesn't seem to be very helpful in providing an answer.

Thanks for your time.

--Stephan.

Hmm, I kinda know what you mean, I have had scripts break here and
there, on the same version of PHP, it then becomes an issue of
compile.

What you can do is make a note of some of the commands you are using,
and what modules they need.

then, with <?php phpinfo() ?> php will spit out its compile config.

with that you should see if you have the mods you require.

or worse, build a big function file with work arounds buit in, and
wrappers for your functions. :(

example, I use imagecopyresampled, and some compiles dont have it so i
have to use imagecopyresize. well I have all my little favorite image
functions in a file, and wrap them with a new name:

example:

function imgCopyNewSize($a,$b,$c,etc...)
{
if (supports resample)
{
imagecopyresampled($a,$b,etc...)
}
else
{
imagecopyresized($a,$b,etc...)
}
}

Mike Bradley
http://gzen.myhq.info -- free online php tools
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mike | last post by:
Just recently, my virus checker detected what it called a Trojan Horse in the py.dll file in the python22 folder. Installation is version 2.2.1 and I think that it came installed when I bought the...
84
by: Andy Glew | last post by:
I am in search of any rigourous, scientific, academic or industrial studies comparing naming conventions in C++ or similar languages such as Ada: Specifically, are names formed with...
4
by: Porthos | last post by:
Hi All, I'm trying to find the minimum value of a set of data (see below). I want to compare the lengths of these attribute values and display the lowest one. This would be simple if I could...
29
by: Bill Marsden | last post by:
Hi. I am an under-graduate currently studying Open Source (Linux) vs Closed Source and Collaboration within the IT Community. I am fairly new to Javascript and I have written a "Lottery Program"...
0
by: fouxman | last post by:
There's a relatively new product in source code spell checking area that should help developers keep their code and GUI spell-clean. It's called Source Code Spell Checker by Parasite Software -...
13
by: kolmogolov | last post by:
/* Hi, I have removed things irrelevant to reproducing the problem. What's wrong with my code? Thanks in advance for any hint! 1166425362 */ #include <stdio.h> #include <stdlib.h> #include...
1
by: nandhini shanmuganathan | last post by:
I need source code for grammar checker using c or c++.pls help me ,urgently needed
6
by: Neil | last post by:
Is there way to have control over the MS-Access spell checking (besides just launching it)? We want to tell it to check all records, but skip certain fields (or, alternatively, ONLY check certain...
6
by: Don | last post by:
I am looking for a C/C++ code spell checker, a tool that checks for spelling errors in C++ source code. Linux/Unix platforms. Prefer command line tool. Open source preferred, but will consider...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.