PHP 4 to PHP 5

Posted on 2005-04-12
Last Modified: 2011-10-03
What difference are there in PHP 5 compared with PHP 4?.  The reason I am asking is that the host for my website has upgraded to PHP 5 and some of the PHP stuff I downloaded only works in PHP 4.

Is it a major task to change something to work in PHP 5?  (As it is a free, the company is unlikely to make the changes, at least at the moment, to get this to work).

Sorry about being a bit vague.

Question by:Expressions
    LVL 27

    Accepted Solution

    The manual at the official PHP website answers your question for the best part...

    Migrating from PHP 4 to PHP 5 ::
    Backward Incompatible Changes ::

    The latter link specifying some of the things you should pay close attention to.

    The biggest change between PHP4 and PHP5 is that the handling of objects (OOP - Object Oriented Programming) was completely rewritten making big big improvements.

    >> Is it a major task to change something to work in PHP 5?

    No. That is to say, if your code is well written in the first place it should generally work fine on both versions.
    LVL 2

    Author Comment

    I haven't forgotten about this, I just haven't had a huge amount of time to deal with it. Sorry!!!
    LVL 27

    Expert Comment

    No problem, Expressions. thank you for dropping by to let me know.

    LVL 2

    Author Comment

    Sorry for being so long at answering this.

    The link was useful, but the code I was looking at needed so much work it just wasnt worth bothering with.

    Thanks for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now