snip
Justin wrote:
In refleciton, I think what all these debates do illuminate is that the upgrade path to PHP5 is anything but easy. Sure you can upgrade to PHP5 but not use any PHP5 features; that will certainly make the upgrade easier, but why upgrade at all then?
1) Because it will allow you to use your PHP4 packages with little to no changes, *side by side with* PHP5 packages. As has been said by many, unless you reassign $this, PHP4 code should run fine in PHP5 (non-E_STRICT).
2) Because it allows an easy upgrade path. You start by using what you have, then rewrite to use new features *as you can*, not necessarily all at once.
3) Because it allows flexibility and ease of use.
Hans wrote:
But why upgrade any packages to PHP5? -- you didn't answer my question. If you're going to require that PHP5 packages don't use PHP5 language features, then why shouldn't those packages just be writtein in PHP4. Asked another way, what can I gain for my package by using PHP5?
I think that the discussion, as often among senior developers, is really leading nowhere ;)
This is because me, Hans and others are using PHP 5 and some other developers are not. I don't think we are going to find a common ground anytime soon so I suggest that
we limit the discussion to new PHP 5 packages. Imposing Pear_Error on new PHP 5 package in lieu of exceptions will be a mistake and probably everyone that will start developing in PHP 5 anytime soon will realize what is all about.
You can't upgrade PHP 4 packages in one line, in fact you don't need to upgrade them. These where written with PHP 4 and you cannot do it the same way in PHP 5. That said these packages will run fine in PHP 5. Please have a look at this page
http://dotgeek.org/pear.php (pear info page) and on the PHP info page you will see what we are running
http://dotgeek.org/phpinfo.php all these pear packages work just as in PHP 4 with no difference whatsoever.
Conclusion: PEAR packages run fine on PHP 5. This doesn't mean that we should write PHP 5 new packages with PHP 4 in mind...
I use PHP5 for interfaces, exceptions, ppp, & other PHP5-only features that are not compatible w/ PHP4 packages. I can always use an existing PHP4 package if needed; in fact, if I need to use PEAR packages I just re-throw PEAR_Error as Exceptions from my calling code.
right
I don't think there's anything keeping people from using PHP4 code from PHP5 code. The question is more about whether to down-play PHP5 features so that it's "easier". You're welcome to, but don't ask me to.
same here. It might take bit more on effort but is well worth it.
Cheers
David Costa
Hans
-- PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php