LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




ReplyREPLY THREAD
 
Thread Tools Display Modes
  #1  
Old 12-23-2004, 12:18 AM
pigpen pigpen is offline
Registered User
 
Join Date: Sep 2004
Posts: 319
Rep Power: 9
pigpen is on a distinguished road
PHP 5 ready for primetime or PHP4 still en vogue?

Just wondering if anyone here is using PHP5 yet on a real world site, or is it still something to just play around with until more bugs get ironed out and more hosts and scripts start to support it.

Reason I ask is that I'm going to be involved in more PHP coding and possibly developing a small, but custom-built CMS for a site and wonder if I should start thinking about PHP 5. It seems PHP 4 is still deeply entrenched as the defacto version for most developers, but I guess my next question is, for how long will PHP 4 stay dominant? 6 months, a year...2 years?

Ideally, I could program the CMS in PHP 5 first, and then doing a PHP4 version next for compatibility, but how easy would it be to do a PHP 5 then converting it to a PHP 5 version. Also, facing deadlines and pushy clients, I might not have the luxury of time.

- PG
Reply With Quote
  #2  
Old 12-23-2004, 01:23 AM
FrozenMedia's Avatar
FrozenMedia FrozenMedia is offline

Frozen Moderator
 
Join Date: Apr 2003
Location: United Kingdom
Posts: 2,701
Rep Power: 13
FrozenMedia is on a distinguished road
The really great thing about serverside is, unless you're going to re-sell your CMS, go PHP 5, you can pick a worthy PHP 5 host that's up to the job and not worry yourself with PHP 4 compatability.

If you DO need to consider the masses, and the CMS is for the public, or to re-sell as is, definitely code to PHP 4 (but PHP 5 compliant) code. I'm no expert in the slightest, but it isn't too hard to do this.

Rich
__________________
Blog: http://www.richardleggett.co.uk | If your happy with the help, let us know about it
Reply With Quote
  #3  
Old 12-23-2004, 07:10 PM
pigpen pigpen is offline
Registered User
 
Join Date: Sep 2004
Posts: 319
Rep Power: 9
pigpen is on a distinguished road
Yeah I like the idea of "php4 but ph5 compliant" code. I don't suppose you know a handy link that talks about what php 4 code will work or will not work in php5?
Reply With Quote
  #4  
Old 12-24-2004, 09:47 AM
prisma prisma is offline

Super Moderator
 
Join Date: May 2001
Location: Munich, Germany
Posts: 1,668
Rep Power: 14
prisma is on a distinguished road
I'm sure almost every php4 code will work with php5. Like with Actionscript2 they will always try to keep the old code working with newer versions. Of course there might be exceptions where it can't be avoided, but I'm sure these are rare. If you're unsure if a function will work in php5 simply look it up at www.php.net
I'd simply code for php4, and see if it works for php5 every now and then.
__________________
... take me to your coder.
Reply With Quote
  #5  
Old 12-24-2004, 10:45 AM
FrozenMedia's Avatar
FrozenMedia FrozenMedia is offline

Frozen Moderator
 
Join Date: Apr 2003
Location: United Kingdom
Posts: 2,701
Rep Power: 13
FrozenMedia is on a distinguished road
Yeah I'm still trying to get GeSHi to work under PHP 5, but I haven't yet tested it on a PHP 5 server with errors switched on, sure it's not too hard to do

Rich
__________________
Blog: http://www.richardleggett.co.uk | If your happy with the help, let us know about it
Reply With Quote
  #6  
Old 12-24-2004, 04:25 PM
pigpen pigpen is offline
Registered User
 
Join Date: Sep 2004
Posts: 319
Rep Power: 9
pigpen is on a distinguished road
Yeah I found that the online manual has a section devoted to migration.

Appendix B. Migrating from PHP 4 to PHP 5
http://www.php.net/manual/en/migration5.php

Since I won't be actually migrating to php 5 (atleast not right away), but rather php 4 code that'll work under php 5. I'll specifically be refering to these sections in the appendix often:

Backward Incompatible Changes
http://www.php.net/manual/en/migrati...compatible.php

List of PHP Keywords
http://www.php.net/manual/en/reserve...erved.keywords

Also I went to the bookstore and got "Updrading to PHP 5" by Adam Trachtenberg (O'Reilly books) and it has some nice info there as well. Especially a good chapter on all the new OOP potential oh PHP 5.

I found through Trachtenberg blog site that he mentions he didn't include some functions in his php 5 book that nevertheless will help people port from php 4 to php 5, such as PHP_VERSION, phpversion(), extension_loaded(), function_exists().

http://www.trachtenberg.com/blog/wri...p_5/index.html

BTW, Trachenberg, along with David Sklar are co-authors of the php4, "PHP Cookbook" which I picked up as well. Thanks for the suggestion Frozenmedia. You're right. For php 4 programming, this is all that I needed.


- P
Reply With Quote
  #7  
Old 12-24-2004, 05:44 PM
pigpen pigpen is offline
Registered User
 
Join Date: Sep 2004
Posts: 319
Rep Power: 9
pigpen is on a distinguished road
Btw...

Anyone recommend a good PHP text editor? I'm been fairly fine with conTEXT, which highlights the PHP syntax, but I wanted to see what else people liked.
http://www.context.cx/

To bad ZendStudio is so expesive. I wonder if there is anything similar available.
http://www.zend.com/store/products/zend-studio.php
Reply With Quote
  #8  
Old 12-24-2004, 05:55 PM
FrozenMedia's Avatar
FrozenMedia FrozenMedia is offline

Frozen Moderator
 
Join Date: Apr 2003
Location: United Kingdom
Posts: 2,701
Rep Power: 13
FrozenMedia is on a distinguished road
I use Dreamweaver because of the superb code completion and parameter prompting for functions. Also includes a PHP handbook (Orielly) that you can search by keyword by hitting F1. Dreamweaver cannot be beaten (or at least tell me if it can...please) for project management. Access to (with checkin/checkout) Local Server, Testing Server and Remote Server by LAN, FTP etc all rolled into one, I've heard people using DW for Flash Projects :P

General editing of any script files (ASP,PHP,AS, HTML) I use PrimalScript, really ACE, this is my ActionScript editor of choice.

As for the free route, I use Notepad2 daily, it highlights almost any code, includes lots of features, is extremely quick and best of all, simply rename it "notepad.exe" in c:\Windows\ and use it to edit anything + brace matching and multiple colour schemes i.e. green on black for the uber hacker . Very good for quick PHP editing, as long as you know your code.

</end spiel>

Rich
__________________
Blog: http://www.richardleggett.co.uk | If your happy with the help, let us know about it
Reply With Quote
  #9  
Old 12-25-2004, 11:58 PM
pigpen pigpen is offline
Registered User
 
Join Date: Sep 2004
Posts: 319
Rep Power: 9
pigpen is on a distinguished road
I took a look at PrimalScript and downloaded the trial. Nice! While I haven't even begin to touch all the features, I did like what I experienced so far. I think I might move from conTEXT to PrimalScript. I also very much liked how it has a small footprint, like conTEXT, so it isn't a memory hog, like some other editing apps.

I use to use Dreamweaver in the early days, version 1 - 3, which made laying out tables and such a real treat but in the late 90's which more of my work being done on dynamic websites, dreamweaver wasn't up to the task. Support back then for php, asp and such wasn't good and would often mess up the formatting of code, despite turning all the autoformatting stuff off so I had to switch to back to text editors and homesite.

But I did hear Dreamweaver has improved immensely. I'll try the latest version out as well.
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash MX Mail Form using PHP is driving me crazy! jaguaru Flash MX 2 04-28-2011 03:04 PM
Flash + PHP --> Security !! yestomike Flash MX 2004 2 01-16-2007 07:58 AM
FLASH PHP Submit Form Whit template!! taro Newbies 15 02-15-2006 03:20 PM
LoadVars or XML with PHP on DIFFERENT servers doesn't work. sckz Server Side 4 02-11-2004 04:30 PM
Flash to PHP to MySQL to PHP to Flash gandalf Server Side 8 04-01-2003 10:20 PM




All times are GMT. The time now is 09:06 PM.