DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Languages
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 12-16-2005, 02:24 PM   #1
ProgramWizard
Valued Member
 
Join Date: Nov 2005
Posts: 143
Default PHP4 and 5

How big a difference is there between PHP4 and 5? I'm writing my PHP scripts in PHP5, but my webhost only supports PHP4.
___________________________________________
Firefox: ProgramWizard's official web browser
Get Firefox
Spread Firefox
hi, i'm a signature viruz, plz set me as your signature and help me spread :)
ProgramWizard is offline   Reply With Quote
Old 12-16-2005, 02:55 PM   #2
Methulah
Senior Member
 
Join Date: Dec 2004
Location: Tasmania, Australia
Posts: 727
Default Re: PHP4 and 5

There shouldn't be an issue unless you go deep into sessions. I think they extrapolated greatly on that in PHP5.
___________________________________________
Django Merope-Synge :: django@white-epsilon.com
Lead Designer/Project Manager - White Epsilon
Methulah is offline   Reply With Quote
Old 12-16-2005, 05:27 PM   #3
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

The difference is that they both suck
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Old 12-16-2005, 10:21 PM   #4
Reedbeta
DevMaster Staff
 
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
Default Re: PHP4 and 5

Aww, .oisyn. Why hating on PHP?

The only difference I've encountered in practice was that PHP4 is missing a few date/time manipulation functions that PHP5 has. But this was just a minor inconvenience (difference between writing idate(blah) and intval(date(blah))).
___________________________________________
Currently working at Sucker Punch
reedbeta.com - OpenGL demos and other projects
Luabridge - a lightweight, dependency-free C++/Lua binding library.
CD Lite - an unobtrusive, minimal CD player application for Windows.
Reedbeta is offline   Reply With Quote
Old 12-17-2005, 09:30 AM   #5
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

Oh come on, the whole reason for the success of PHP is that hosting is widely available and it's fairly simple to get it started. Which is indeed a good thing.

But the pro's end there, the con's are that it's a terribly hobby project gone bad. The whole language and library is inconsistent and poorly designed. They tried to give PHP a more professional image with PHP 5 by implementing better OO functionality but they failed miserably.

If you ask me, it's time for the Zend team to start completely from scratch with a good designed language. But I don't want to turn this thread in a PHP discussion, my previous post was more meant as a joke than as a troll, so I'll keep my mouth shut from now on
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Old 12-17-2005, 09:37 AM   #6
monjardin
Senior Member
 
Join Date: Oct 2005
Location: Pensacola, FL
Posts: 1,028
Default Re: PHP4 and 5

@.oisyn: Well, as long as you have brought it up... What is your favored alternative?
monjardin is offline   Reply With Quote
Old 12-17-2005, 09:48 AM   #7
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

Well there isn't any, actually, I use PHP myself . Or you should consider Java servlets or ASP(.Net) as alternatives, but I think they are both much too bloated to write a simple script. PHP has definitely an advantage there.

I once had the idea to create an alternative loose-typed scripting language with a syntax more closer to C++, but I don't really have the time to write it
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Old 12-17-2005, 09:59 AM   #8
monjardin
Senior Member
 
Join Date: Oct 2005
Location: Pensacola, FL
Posts: 1,028
Default Re: PHP4 and 5

That's about what I thought you would say. I am inclined to agree with you though.
monjardin is offline   Reply With Quote
Old 12-18-2005, 07:24 AM   #9
geon
Senior Member
 
geon's Avatar
 
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 546
Default Re: PHP4 and 5

I think .oisyn mostly expresses the frustration of coding. We want to make the simple things quickly, without all the tedious typing. But there just isn't such a product.

Have a look at Ruby On Rails, though. The concept is pretty interesting, even if I doubt it's usefullness in real situations.
geon is offline   Reply With Quote
Old 12-18-2005, 11:11 AM   #10
eddie
Senior Member
 
Join Date: Oct 2005
Posts: 745
Default Re: PHP4 and 5

I've heard good things about RoR; but I haven't been able to use it yet. I should pick it up some time.

That said, PHP has a definite advantage of being almost ubiquitous and being very easy to write in.

Personally I don't mind PHP. I haven't done much PHP5, but PHP4 + Smarty usually makes me pretty happy.
___________________________________________
Kicking Dragon (dot) com - Technical Ramblings of a Game Programmer
eddie is offline   Reply With Quote
Old 12-19-2005, 03:49 AM   #11
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

Quote:
Originally Posted by geon
I think .oisyn mostly expresses the frustration of coding. We want to make the simple things quickly, without all the tedious typing. But there just isn't such a product.

No, I'm talking about the actual bad design of the language. The current concepts of globals and references, for example, are a crime and definitely need to go. And why is null equal to a zero-length string or 0? And why is "12ab" equal to 12? And why don't the [] and () operators work on the result of a function call, while all other operators do work? And continue in a switch, what's up with that?
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Old 12-20-2005, 12:25 AM   #12
geon
Senior Member
 
geon's Avatar
 
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 546
Default Re: PHP4 and 5

Quote:
Originally Posted by .oisyn
And why is "12ab" equal to 12? And why don't the [] and () operators work on the result of a function call, while all other operators do work?

The "12ab" == 12 part seems natyural to me. At least if you are comparing a string with an int, without any preparations of the string. Remember, you could easily make it "12ab" == 12."" if you wanted the comparision to be more strict. Or you could be even more strict by making it "12ab" === 12, but that would only be usefull to protect you from type missmatch.

I agree totally though on the [] and () operators. Totally stupid. Should be fixed.
geon is offline   Reply With Quote
Old 12-20-2005, 03:35 AM   #13
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

Quote:
The "12ab" == 12 part seems natyural to me
Not to me, the string "12ab" shouldn't be convertible to an int. For example, suppose I've written forumsoftware and you want to access a topic using the url forum.php?topic=topicnumber. "12ab" for topicnumber is an invalid index, it should definitely not get topic 12. But there's no good way to detect whether such a string is really a number, the is_int function only checks for the runtime type of the variable, and because it's a string it returns false. A check against (int)12 returns true, even $topic == (int)$topic returns true.

If you really want to check if a value is an int you should do $a == (string)(int)$a. I'm sorry, but that's just bad design in my book. The autoconversion routines should be way more strict than they currently are, this will also solve a lot of newbie problems.
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Old 12-26-2005, 11:42 AM   #14
ProgramWizard
Valued Member
 
Join Date: Nov 2005
Posts: 143
Default Re: PHP4 and 5

Jumping back in, I like working with PHP. I get things done with it a lot quicker than with ASP(.NET). I doubt it would be used by so many websites and companies if they didn't think the same
BTW, like these forums? They're written in PHP
___________________________________________
Firefox: ProgramWizard's official web browser
Get Firefox
Spread Firefox
hi, i'm a signature viruz, plz set me as your signature and help me spread :)
ProgramWizard is offline   Reply With Quote
Old 12-26-2005, 05:46 PM   #15
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

Success is no good reason for not being critical
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Old 12-26-2005, 06:17 PM   #16
zavie
Member
 
zavie's Avatar
 
Join Date: Aug 2005
Location: Vannes, Brittany, France
Posts: 88
Default Re: PHP4 and 5

Quote:
Originally Posted by monjardin
@.oisyn: Well, as long as you have brought it up... What is your favored alternative?

I've heard many people saying Ruby was a very well designed scripting language. I haven't tried it yet though.
___________________________________________
Zavie, Prologin member, homeless flipcoder...
zavie is offline   Reply With Quote
Old 12-27-2005, 01:38 AM   #17
Methulah
Senior Member
 
Join Date: Dec 2004
Location: Tasmania, Australia
Posts: 727
Default Re: PHP4 and 5

@ProgramWizard: Most popular forums are written in PHP, simply because it interacts nicely with MySQL, has good hosting support and is very easy to script in.

Me, I love PHP, it is my favourite language, but after all, I'm not a coder. I think Perl is good for more extensive things, and if you really want to go hard, ASP code-behind is undeniably powerful. At the end of the day though, for most situations, PHP makes sense, and damn it makes it easy.
___________________________________________
Django Merope-Synge :: django@white-epsilon.com
Lead Designer/Project Manager - White Epsilon
Methulah is offline   Reply With Quote
Old 12-27-2005, 05:37 AM   #18
ProgramWizard
Valued Member
 
Join Date: Nov 2005
Posts: 143
Default Re: PHP4 and 5

A bit off-topic, but I've heard of people getting masters degrees in PHP. Not sure why I wanted to bring that up...
___________________________________________
Firefox: ProgramWizard's official web browser
Get Firefox
Spread Firefox
hi, i'm a signature viruz, plz set me as your signature and help me spread :)
ProgramWizard is offline   Reply With Quote
Old 12-27-2005, 07:40 PM   #19
eddie
Senior Member
 
Join Date: Oct 2005
Posts: 745
Default Re: PHP4 and 5

[pedantic]
I've never heard of a "Masters in C++" myself, either.
[/pedantic]
___________________________________________
Kicking Dragon (dot) com - Technical Ramblings of a Game Programmer
eddie is offline   Reply With Quote
Old 12-28-2005, 08:18 AM   #20
ProgramWizard
Valued Member
 
Join Date: Nov 2005
Posts: 143
Default Re: PHP4 and 5

Quote:
Originally Posted by eddie
[pedantic]
I've never heard of a "Masters in C++" myself, either.
[/pedantic]
Huh? I've heard of a Master's degree in C++...
___________________________________________
Firefox: ProgramWizard's official web browser
Get Firefox
Spread Firefox
hi, i'm a signature viruz, plz set me as your signature and help me spread :)
ProgramWizard is offline   Reply With Quote
Old 12-28-2005, 09:43 AM   #21
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

How pointless, what would such a master's degree involve?
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Old 12-28-2005, 12:42 PM   #22
ProgramWizard
Valued Member
 
Join Date: Nov 2005
Posts: 143
Default Re: PHP4 and 5

Knowing how to program really good in whatever language you got it for, I guess. Maybe it would also entail all of the common API's for the language.
___________________________________________
Firefox: ProgramWizard's official web browser
Get Firefox
Spread Firefox
hi, i'm a signature viruz, plz set me as your signature and help me spread :)
ProgramWizard is offline   Reply With Quote
Old 12-28-2005, 01:17 PM   #23
darqSHADOW
Member
 
Join Date: Aug 2004
Posts: 69
Default Re: PHP4 and 5

Quote:
We want to make the simple things quickly, without all the tedious typing. But there just isn't such a product.

ASP.Net gives you this ability quite nicely. I can actually get products to market much faster using ASP.Net than PHP -- both of which I consider myself an expert programmer with, except I've used ASP.Net for only 4 years, and PHP for closer to 10.

Quote:
Huh? I've heard of a Master's degree in C++...

There is no such thing. You might have a Masters Degree in CS, but not in C++ or PHP directly. There is NO way a school would dedicate an entire masters program to such a small subset, nor would anyone pay the hundreds of thousands of dollars a Masters Degree costs. (Btw, I have two Masters degrees, so I have been through the process of selecting from the list...)

DS
darqSHADOW is offline   Reply With Quote
Old 12-30-2005, 06:49 AM   #24
ProgramWizard
Valued Member
 
Join Date: Nov 2005
Posts: 143
Exclamation Re: PHP4 and 5

Quote:
Originally Posted by darqSHADOW
PHP for closer to 10.
You mean PHP has been out for over 10 years
___________________________________________
Firefox: ProgramWizard's official web browser
Get Firefox
Spread Firefox
hi, i'm a signature viruz, plz set me as your signature and help me spread :)
ProgramWizard is offline   Reply With Quote
Old 12-30-2005, 07:44 AM   #25
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: PHP4 and 5

Quote:
Originally Posted by ProgramWizard
Knowing how to program really good in whatever language you got it for, I guess. Maybe it would also entail all of the common API's for the language.

Maybe for a college degree, but I don't see that being a master's degree.
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.
.oisyn is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 09:51 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.