PHP5 Language Features

PHP5 Language Features

by Donal McMullan -
Number of replies: 10
The experimental "Enable global search" feature is PHP5-only.

I like PHP5 a lot, and I miss some of the features when I'm developing in PHP4. Is there a time on the horizon when Moodle will commit to a release that does not run on PHP4?

Moodle core is widely used and tested on PHP5, so there shouldn't be any restriction in the codebase to prevent this. What other concerns might prevent developers from using PHP5 features in Moodle?
Average of ratings: -
In reply to Donal McMullan

Re: PHP5 Language Features

by Penny Leach -
http://docs.moodle.org/en/Roadmap#Version_2.0_-_Expected_Late_2007

smile


(you know I'm just down the hallway right? tongueout )
In reply to Penny Leach

Re: PHP5 Language Features

by Donal McMullan -
Yeah, if I crane my neck in your direction, sometimes I can just about hear your voice.

mixed
In reply to Donal McMullan

Re: PHP5 Language Features

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The reason is that over 80% of web hosts are still on PHP4.

http://www.nexen.net/chiffres_cles/phpversion/16639-php_stats_evolution_for_february_2007.php

I think Moodle 2.0 will be a good time to switch to PHP5.
In reply to Martin Dougiamas

Re: PHP5 Language Features

by Martín Langhoff -
> the reason is that over 80% of web hosts are still on PHP4.

WOW. I never thought it was happening _that_ slow. When it hits 45~50% with a good growth rate it might be the right time...

> I think Moodle 2.0 will be a good time to switch to PHP5.

Hah! If we roll 1.8->1.9->2.0 (instead of 1.10!) then I don't think PHP5 will be widespread enough to matter sad

Thinking of this... 2.0 is less and less useful as "magic receding horizon" these days. Should we start talking v3.0? wink

Or maybe we need some version-inflation and _skip_ 2.0 and go straight to... v6.0

In reply to Martín Langhoff

Re: PHP5 Language Features

by Donal McMullan -
I'm not sure that there even is a vanishing point for PHP4 vs PHP5, because there are so many alternatives to PHP now.

Maybe we should quit with version numbers altogether.... how about "Moodle Vista"???

evil
In reply to Donal McMullan

Re: PHP5 Language Features

by Martín Langhoff -
I was thinking the same - but those stats are for servers *with* PHP installed. So that's 80% of "the PHP hosting universe" for 4.x, vs 16% for PHP5.x. To refine things further we'd need to chop off <4.3 as Moodle doesn't support it, but that's tiny. Most of that 80% is 4.3 and 4.4.

So IMHO there is a threshold point for 5.x at some point. When/where I don't know.

> how about "Moodle Vista"???

I kind of like the Solaris astronomy-themed release names. Hey -- there it is: something I like about Solaris!
In reply to Martín Langhoff

Re: PHP5 Language Features

by Donal McMullan -
Moodle™ Vista™ Home™ Premium™?

Don't be hating on Solaris or your holiday photos could magically disappear. It's ornery like that.
In reply to Donal McMullan

Re: PHP5 Language Features

by Tony Hursh -
Moodle++ Vista™ Home™ Premium™ Professional™ Enterprise™ Web™ 2.0™ Ajax™ Edition™.
In reply to Martín Langhoff

Re: PHP5 Language Features

by Samuli Karevaara -
Well, there is plenty of room in the "third digit" that Moodle has not utilized yet. See Linux Kernel 2.1 for example smile (Moodle 1.9.132 big grin)

Of the clients "stuck" on PHP 4 installations, I wonder how many have an option to switch relatively easily to PHP 5 as many hosts provide both 4 and 5?