Ditch PHP 4 and go php 5

There has been a lot of tutorials and news over PHP 5. Here let me put out a small litte thing that make a big difference and why people should look on to PHP 5.
Below i am showing a small program and which was tested in PHP 4.47.

< ?php
function Devil($arg)
{ echo “I am Vinoth babu.”; }
Devil();
?>

We get the following error message

Warning: Missing argument 1 for test() in /usr/bin/- on line 2

Geeks may understand on why this error message appears as it was due to how the function was called. The required parameter to test was not passed. This is actually annoying, which will surely force you to consult a stack trace to find the actual error location. Lets leave these geeks, what will be the beginners fate, will they know how to do.?

However, if you run the same message in PHP 5 (tested on 5.2.2):

Warning: Missing argument 1 for test(), called in /Users/jeff/- on line 3 and defined in /Users/jeff/- on line 2

This is actually a great improvement. One pretty good reason you have to ditch PHP 4 and go to PHP 5.

About the Author

Vinothbabu has written 22 stories on this site.

In short, my name is Vinoth babu { perra kettala summa authrithala } a UI expert from India, Chennai.

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!

Copyright © 2009 HTTPguru. All rights reserved.

Our Partners:
WebHosting Jobs| UI expert | Packet Sniffer  | Mobile Home Refinancing  | Laptop LCD screens | CSS Creator| Coupon Codes| Exchange Hosting