473,320 Members | 1,936 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,320 software developers and data experts.

Difference between the PHP3,PHP4 and PHP5

Difference between the PHP3 and PHP4 and PHP5
Jul 4 '07 #1
6 10902
dafodil
392 256MB
Difference between the PHP3 and PHP4 and PHP5

Try this link to see all the updates about the releases of php:
http://www.php.net/
Jul 4 '07 #2
ak1dnar
1,584 Expert 1GB
Thread title changed – Ajaxrand
[Please Read why!]

Earlier : I want Answers for the Questions relate to PHP
Recent : Difference between the PHP3,PHP4 and PHP5
Jul 4 '07 #3
pbmods
5,821 Expert 4TB
Heya, gvijayasurya.

The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. You have not asked a question. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

Then when you are ready post a new question in this thread.

MODERATOR
Jul 4 '07 #4
Atli
5,058 Expert 4TB
You can find some info on this subject here at php.net
Jul 4 '07 #5
kovik
1,044 Expert 1GB
PHP 3 is useless compared to 4 and 5.
PHP 4 is used mostly by programmers who are hosted under it and don't have a say in the matter (and, it's actually faster, but not by much).
PHP 5 is the recommended choice. It has true OOP.
Jul 4 '07 #6
PHP 3 is useless compared to 4 and 5.
PHP 4 is used mostly by programmers who are hosted under it and don't have a say in the matter (and, it's actually faster, but not by much).
PHP 5 is the recommended choice. It has true OOP.
• PHP 5 allows limited type hinting. This allows you to specify that the parameter
to a function or class method can only be of a specific class (or one of its
subclasses), or an array. However, you may not specify any other scalar types.
• The foreach construct now supports by-reference declaration of the value element.
• A number of new functions, particularly for string and array manipulation, have also been added to the core platform.
• Objects-For all intents and purposes, all objects in PHP 5 are passed by reference. This means that assigning an object to a variable will not create a copy of the former, but simply creates another reference to it.
• Constants, as well as static methods and properties, can now be defined within the scope of a class.
• Class methods and properties now feature visibility, and can be declared as public, private or protected. Classes and methods can also be declared as final to prevent further inheritance
• Since all objects are assigned by reference, you now need a specialized mechanism to copy objects. This is provided by the clone construct and the __clone () magic method.
• PHP 5 features unified constructors and destructors—all constructors should now be named __construct(), and the new __destruct() magic method has been added for object destruction.
• With the addition of interfaces and abstract classes, PHP developers now have far greater control over how they implement their object-oriented code. Interfaces can be used to define common APIs, while abstract classes provide models for class implementations that follow a specific blueprint.
• Class definitions can now be loaded on demand by using the __auto load()function.

Magic Methods A multitude of new “magic” methods has been introduced in PHP 5:
• __get() and __set() are called when accessing or assigning an undefined object property, while __call() is executed when calling a non-existent method of a class.
• __isset() is called when passing an undefined property to the isset() construct.
• __unset() is called when passing an undefined property to unset().
• __toString() is called when trying to directly echo or print() an object.
• __set_state() is inserted dynamically by var_export() to allow for reinitialization 3on execution of var_export()’s output.

Selected New Extensions
• SimpleXML allows easy access to XML data using object and array notation.
• PHP 5 also introduces a DOMXML, DOMXSL and Sablotron replacement in the form of the libxml2-based DOM and XSL extensions.
• The PHP Data Objects (PDO) extension provides a unified database access extension that allows access to many different types of database systems by using a common interface. PDO is not an abstraction layer—except for prepared queries, it does nothing to abstract the actual database code (SQL), itself.
• The hash extension is a new replacement for the GPLed libmhash; it was added to the PHP core starting with version 5.1.2. It can produce hashes using many algorithms, including the familiar MD5 and SHA1, as well as some more secure (albeit slower) algorithms, such as snefru.
• The Standard PHP Library (SPL) provides numerous interfaces that enhance the way classes interact with the PHP language, including the new Iterator interfaces.
• The new Reflection extension allows for runtime introspection of executing
PHP code.

Error Management:

Classes now support exceptions; the new set_exception_handler() function
allows you to define a script-wide exception handler.
• The E_STRICT error reporting level has been added to the language to emit notices
when legacy or deprecated code is encountered.
Aug 9 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tim Tyler | last post by:
I'm sure this is a FAQ - but I could not find a coherent statement of the answer: Some of my clients want PHP4. Other ones want PHP5. Can I run both PHP4 and PHP5 under the same instance of...
2
by: pancho | last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO on a Solaris 8 box - this module is needed to host some existing sites I will be migrating Note. I built PHP4 from source and...
0
by: Dave Pham | last post by:
I just cleaned my comp, and I am trying to re-config my webserver... I am trying to setup apache 2 so it runs both php4 and php5, I also have two instances of mysql running. I know this can be...
1
by: dk_sz | last post by:
Is it just me... Or is PHP5 XML very limited? Or am I missing something very obvious? Any way to use PHP4 Dom XML in PHP5? Does anyone know why support for it was dropped? I have following...
12
by: Drazen Gemic | last post by:
How long will PHP4 be supported ? When is PHP4 end of life scheduled ? DG
3
by: xhe | last post by:
I have just upgraded my php version form php4 to php5. and I met this problem, and don't know if you know the solution. My site was written in PHP4, and most parts can be running smoothly in PHP5,...
8
by: FFMG | last post by:
Hi, I am slowly moving my code to php5. But I would like to make it backward compatible in case something bad happens, (and to make sure I understand what the changes are). The way the...
3
by: jmark | last post by:
I am currently running php 4.4.7 in windows xp and apache 2. If I enter php in command line. I get the following error The application has failed to start because php5ts.dll was not found" I...
7
by: coolsti | last post by:
I have just noticed a very large difference in memory usage for the PHP applications that I have developed for my company between my developmental machine and the "production" machine: Development...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.