CodeIgniter Forums
CodeIgniter future with PHP5 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: CodeIgniter future with PHP5 (/showthread.php?tid=5345)

Pages: 1 2 3 4


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]Jon Braud[/eluser]
Hey folks,
More of a "to whom it may concern". Out of interest, are there any plans to move CodeIgniter over completely to PHP5, dropping support for PHP4 seeing as the PHP team seem to be moving closer and closer to stopping work on PHP 4.x in favour to concentrating on PHP 5.x.

I understand the issues with legacy code that would result from supporting solely PHP5 but someone has to make the step in that direction, right? Noone else seems to be willing to.

Just a thought. It's probably came up before. (sorry if it has, I did search!).

Ta,
Jon.


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]Edemilson Lima[/eluser]
Many web hostings don't offer PHP 5 yet. I don't think is necessary to drop the support for PHP4, as we can made applications for one version or another. When PHP 6 comes, I think CI will have support for it too.


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]thurting[/eluser]
The short answer is NO. However, the dev team has stated that as 4 gets phased out they will obviously switch to 5. This may take years though.

The good news, CI is compatible with 4 and 5, so you can use it and code all of your classes in 5. However, the core is coded in 4, so it doesn't take advantage of any of the features of 5. You may want to check out Kohana. Kohana began as CI ported to 5 strict.

You may also want to check out other frameworks. Zend Framework is nice and has a pretty huge 1.5 milestone around the corner. The quality of the code and documentation is excellent.

BTW, I'm getting tire of hearing "Many web hostings don’t offer PHP 5 yet." If your host doesn't offer 5, then they are not a good host. I understand if you are running servers in house and haven't yet upgraded, but if you are purchasing hosting 5 should be expected. It is 3 1/2 yrs old.


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]Edemilson Lima[/eluser]
Quote:However, the core is coded in 4, so it doesn’t take advantage of any of the features of 5.

Are you sure?

system/codeigniter/Base4.php:
* CI_BASE - For PHP 4
*
* This file is used only when CodeIgniter is being run under PHP 4.
*
* In order to allow CI to work under PHP 4 we had to make the Loader class
* the parent of the Controller Base class. It's the only way we can
* enable functions like $this->load->library('email') to instantiate
* classes that can then be used within controllers as $this->email->send()
*
* PHP 4 also has trouble referencing the CI super object within application
* constructors since objects do not exist until the class is fully
* instantiated. Basically PHP 4 sucks...

system/codeigniter/Base5.php:
* CI_BASE - For PHP 5
*
* This file contains some code used only when CodeIgniter is being
* run under PHP 5. It allows us to manage the CI super object more
* gracefully than what is possible with PHP 4.

Quote:If your host doesn’t offer 5, then they are not a good host.

I agree! Smile


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]Beren[/eluser]
There's some discussion of this subject with Derek Allard (EllisLab's main CI dev) on this thread, just last week - can't get better than straight from the horse's mouth...
http://www.ellislab.com/forums/viewthread/68408/


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]thurting[/eluser]
[quote author="Edemilson Lima" date="1200700980"]
Are you sure?
[/quote]

Yes. Take a close look at those classes. A very small use just to help reference the CI super object globally. I wouldn't really call it taking advantage of 5 and it is limited to this instance. Kind of jacked up either way.


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]Derek Jones[/eluser]
The minor conciliations that CI makes to accommodate the 72% of potential installations out there that are on PHP 4 seem to us to be a better trade off than the minor advantages to be gained from only supporting the 28% who have PHP 5 available. If you think PHP 4 is going to quickly die because the PHP team stops supporting it, you have only to look at MySQL 3 and the number of hosts still running it many years after support was dropped. The change is not going to come at the Speed of Developer, sadly; the transition is slow, and not yet accelerating.

June '07
December '07


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]Jon Braud[/eluser]
Derek,
I completely agree, PHP4.x is going to exist for a long time, that's for sure, and it's a shame that the transition for 4.x to 5.x is going so slow, but that's life and the reasons are obvious.

It's just a shame that the middle-man, between us developers and the team supplying our software, is a business model bent on taking our money and spoon-feeding us what they want, when they want.

It makes me wonder in what year (read: decade) will we start seeing PHP 6.x on more than 'the odd' host. I'm sure when that comes to pass, someone will have an idea to make a post just like this about PHP5 vs. PHP6. Hell, it might even be me! Smile

Jon.


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]Derek Jones[/eluser]
Quote:It makes me wonder in what year (read: decade) will we start seeing PHP 6.x on more than ‘the odd’ host.

I'm not sure, but I would not be surprised to read out about it via my Atom-enabled sunglasses whilst enjoying my retirement in Fiji.


CodeIgniter future with PHP5 - El Forum - 01-18-2008

[eluser]xwero[/eluser]
[quote author="Derek Jones" date="1200704805"]I'm not sure, but I would not be surprised to read out about it via my Atom-enabled sunglasses whilst enjoying my retirement in Fiji.[/quote]
Are you aware your bosses are reading this %-P