/    Sign up×
Community /Pin to ProfileBookmark

Updating PHP 4.x to PHP 5 – Any Tools?

Are there any freely available tools to assist in reviewing PHP 4.x scripts to update them to PHP 5.x?

I have several simple scrips that were written for PHP 4.x and now I need to update them to run correctly under PHP 5.x. I am not a PHP programmer nor the original author of the scripts, so I am looking to see if there is at least a semi-automated way to identify any issues that need to be dealt with in terms of outdated code, old commands, etc.

Thanks,

-Danny.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 30.2015 — I do not know of any tools (which does not mean they aren't out there). This page can give you some things to search for in your code: http://php.net/manual/en/migration5.incompatible.php

You could also run each script through "lint" from the command line to see if it detects any problems (running them in your new target environment):
$ php -l path/to/script.php
(that's a lower-case "L" for the option: only check syntax, not actually run the script)
×

Success!

Help @dweiss spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...