SitePoint Sponsor |
|
User Tag List
Results 76 to 100 of 174
Thread: Is it safe to abandon PHP4 yet?
-
Dec 31, 2005, 18:29 #76
- Join Date
- Oct 2003
- Location
- The Netherlands
- Posts
- 406
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by KLB
-
Dec 31, 2005, 18:58 #77
- Join Date
- Aug 2003
- Location
- Toronto
- Posts
- 300
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by execute
-
Jan 1, 2006, 00:40 #78
- Join Date
- Oct 2004
- Location
- naperville
- Posts
- 189
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Archbob
Originally Posted by execute
Originally Posted by execute
-
Jan 1, 2006, 01:28 #79
- Join Date
- Nov 2002
- Posts
- 841
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
PHP 3, PHP 4, and PHP 5 all have different object models. One could argue that the whole affair of using references for objects in PHP 4 was a dead end. But, now we have the object model we should have had and that won't change. Unfortunately, its a big change.
PHP will have the same object model from now on. I doubt the change from 5 to 6 will be as traumatic. Although, perhaps with the unicode stuff, some fundamental string manipulation stuff will break. I suspect that this stuff will be much easier to fix, however.
-
Jan 1, 2006, 07:55 #80
Originally Posted by execute
FHQK ed UP - It's a really FHQK ed UP world we live in!
Hiveminds Magazine
Search Engine for Drupal
Search Engine for Students
-
Jan 1, 2006, 09:43 #81
- Join Date
- Dec 2005
- Location
- Florida
- Posts
- 150
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yes but the functions you have mentioned don't really interest me to switch all my coding, and recode my website for it. You haven't mentioned any new function that really saves a lot of time, except getting rid of the &s, which isn't that time consuming anyway. Of course it probably has it's uses, but not enough for me to switch versions.
Give me a function or method of coding that will actually do something that i cant do in PHP 4, and I'll switch over. OOP can be complicated in certain applications, and please do not take shots at my skill/style because it's childish, and i've been doing pHP for years. Please before you argue, try and take pHPbb code and make it OOP, I'm sure it'll be time consuming, and lots of bugs will come up.Inferno Programming Tutorials has articles by experts.
-
Jan 1, 2006, 10:25 #82
- Join Date
- Nov 2003
- Location
- Maine USA
- Posts
- 3,781
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Kilroy
If I did lots of PHP programming, there might be a payback for upgrading and learning new techniques. I do not; however, do a lot of PHP programming any more so there is little advantage to going through the expense of updating.Ken Barbalace: EnvironmentalChemistry.com (Blog, Careers)
InternetSAR.org Volunteers Assist Search and Rescue via Internet
My Firefox Theme: Classic Compact
Based onFirefox's default theme but uses much less window space
-
Jan 1, 2006, 10:45 #83
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I do not; however, do a lot of PHP programming any more so there is little advantage to going through the expense of updating.
If your not prepared to make the move, for whatever reason, then fair enough, that's your choice, but please do not bleat on about there being no advantage of a move, just because you do not see any benifits, immediate or otherwise.
If hosts are not prepared to adapt PHP5 then they are hurting developers short term, and they are hurting clients long term.
Execute,
Once you begin to develop moderately large scale applications, you will see without a doubt, the benifits of what PHP5 offers you over what PHP4 can.
Don't knock it.
-
Jan 1, 2006, 10:55 #84
- Join Date
- Jul 2000
- Location
- Perth Australia
- Posts
- 1,717
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So what excatly in PHP4 is not compatible with 5? What specific functions work in 4 and not in 5?
Give me a function or method of coding that will actually do something that i cant do in PHP 4
...................
Funny thing is I use Plesk on a couple of servers & Plesk reloaded runs on PHP5 ... but Plesk suggest that they dont provide PHP5 as part of Plesk since its not yet tested/stable ??? then again Plesk stores all user (and admin) passwords in plain text so what do you expect
I am having problems working out why this thread is going the way it is , each to thier own, live and let live etc, chill, there ARE compatibility issues between PHP4/5 and 6 is a self proclaimed BC no-no, but lets argue about that one instead
-
Jan 1, 2006, 10:56 #85
- Join Date
- Jul 2000
- Location
- Perth Australia
- Posts
- 1,717
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
BTW regardless of functionality PHP5 is simply faster than PHP4 even with same-same code , so to ignore that seems counter-productive ?
-
Jan 1, 2006, 12:01 #86
- Join Date
- Nov 2003
- Location
- Maine USA
- Posts
- 3,781
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dr Livingston
Originally Posted by Dr Livingston
The failure of web hosts to adopt PHP5 and the failure of web publishers like myself to demand PHP5 is not the lack of vision on our part, but rather the failure of PHP developers to understand some fundamental needs of web hosts and non-bleeding edge web developers and the failing of PHP developers to provide really compelling benefits to upgrading. That fundamental requirement web hosts and developers like my self have are seamless backwards compatibility and a seamless transition. PHP5 does not meet this requirement.
Originally Posted by firepages
Ken Barbalace: EnvironmentalChemistry.com (Blog, Careers)
InternetSAR.org Volunteers Assist Search and Rescue via Internet
My Firefox Theme: Classic Compact
Based onFirefox's default theme but uses much less window space
-
Jan 1, 2006, 12:10 #87
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by KLB
Big releases are damaging.
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Jan 1, 2006, 12:14 #88
- Join Date
- Oct 2003
- Location
- The Netherlands
- Posts
- 406
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by KLB
-
Jan 1, 2006, 12:41 #89
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by Archbob
I know a load of ex-Smalltalk Java developers. Smalltalk has blocks and closures which are missing from Java, but it turns out you can bend inner classes to produce something similar. These guys write Java code that I don't understand. They see an advantage to this style that I don't, one that makes their approach extremely powerful. They somehow manage to do a lot with not much code. They are a rung above me on that particular ladder. I don't miss this though, because I am just not aware of it. I can write stuff in Java and get there in the end, so until I see this stuff I think there is nothing new under the Sun (microsystems). Luckily I am aware something is up, so I'm learning some Ruby to explore further.
The Lisp/Scheme/Haskell crowd can do very clever on the fly language parsing tricks. They see no distinction between SAX parsing and DOM parsing for example, because they are doing something altogether higher order with macros/reducers type stuff. I just don't understand what they do. I can still parse XML, and if I wasn't aware that Lisp/Scheme/Haskell existed, I'd do it the same dumb way forever. I'm fine until shown that another world exists. As it happens, I am now looking at Haskell.
I bet this is true for rules engines and logic driven programming - the same for aspects and metaprogramming. I don't "need" it, because I know nothing about it. I can build everything with handtools, what do I need powertools for? As I get better with my handtools I have to think less, so I think things are becoming slightly faster. I am not a good enough programmer yet, I just think I am. All the while, I could force myself to think a little more, and suddenly find I could go a lot faster. I think this is the key. When you can write the code faster than you can think, you are missing something.
It's as if you are climbing a ladder into a cloud and you cannot see the next rung up. only the ones below you. You think you are always close to the top. You can probably tell where this is going...
The value in OO is in evolving an explicit model of the project domain. Coding hardcore OO is a process of learning about the business you are developing for. The programming kind of disappears into the background once you are fluent. If the OO model matches the problem, a feature gets added near instantly. If there is a mismatch you learn, correct the model, and feel one step closer to the problem. It's difficult to convey the joy of being "connected" to a problem domain and exploringthis new world. It's like trying to explain visual metaphors of a painting to a blind man, there is just no shared vocabulary.
So does OO allow you to write less code? For a single class/script you will have slightly more. However, the extra factoring power will allow you to collapse code on occasion as a more elegant model emerges.
Will your OO code go faster? For a single class/script it will be slightly slower. The ability to break your code down into chunks will allow you to easily add lazy evaluation, caching and compiled components. These types of change make oredr of magnitude performance changes, so yes, OO makes your code go faster.
Will OO make your code more correct? For small routine programs, no. A functional or data description is easier for the developer to understand. This means that the developer can develop the code in their head almost as they discuss requirements. At least for small problems. Unfortunately that approach breaks down completely for larger ones. With OO you expect to get it wrong, and then build the model as requirements come in. A slower start, but it soon starts to hum. Even by version 1 at least a third of the predesigned code will have been wrong. OO even has the benefit of building models in the same language as the business, aiding later comunication. So yes, OO does allow you to build more correct code.
Unfortunately, if you have never experienced this, then you won't see the point.
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Jan 1, 2006, 13:10 #90
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Quickly,
In fact it may be much smarter to skip PHP5 all together and go straight to PHP6 once it has been completed.
I might add that it will in all probability, be a lot easier to refactor from PHP5 to PHP6, than it would be from PHP4 to PHP6, simple because the object model between version 5 and 6 are identical;
Reading the recent PHP6 meeting, the object model has no changes, that would effect our PHP5 scripts.
-
Jan 1, 2006, 14:33 #91
Originally Posted by lastcraft
PS. if anyone suggests using .net/mono & javascript.. its a crippled version of javascript
-
Jan 1, 2006, 14:35 #92
Originally Posted by firepages
-
Jan 1, 2006, 15:48 #93
- Join Date
- Nov 2002
- Posts
- 841
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dr Livingston
PHP 6 is going to break BC because it will also change a fundamental aspect of the language: how the basic string type is handled. However, I suspect that writing code that works in both 5 and 6 will be easier than writing code that works in both 4 and 5.
In other words, I think it will be easier to write code that works in two different string paradigms, single byte versus UTF-8, which were designed to be compatible, than it is to write code that works in two different object models.
PHP 3: pass objects by value
PHP 4: pass objects by reference or value
PHP 5: pass objects by reference
-
Jan 1, 2006, 15:48 #94
- Join Date
- Aug 2003
- Location
- Toronto
- Posts
- 300
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by KLB
Originally Posted by KLB
-
Jan 1, 2006, 15:50 #95
- Join Date
- Aug 2003
- Location
- Toronto
- Posts
- 300
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by lastcraft
Last edited by jayboots; Jan 1, 2006 at 16:37.
-
Jan 1, 2006, 16:46 #96
- Join Date
- Sep 2001
- Location
- Somewhere in this vast universe
- Posts
- 3,741
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So, what if you don't really use OO, then the switch from 4 to 5 should be fine right?
But then again, if you don't use OO, there's really no point in switching.
If PHP6 forces string types, then I'm pretty screwed. I've always used PHP so I didn't have to declare the type of variables.
-
Jan 1, 2006, 17:36 #97
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by jayboots
Suppose they did this...
1) PHP 4.9 allows proper cloning and deprecates the copy symantics of $a = $b for objects in fvour of $a = $b->clone(). That would have been the only change, the $a = &$b would stay, even encouraged.
2) PHP5 changes the symantics to $a = $b is a reference copy making the '&' redundant. It's declared deprecated. PHP5 would run a little slower, because it would have to perform object type checks whilst both systems were supported. Alternately an ini setting at teh start of teh script declares one behaviour or another to maintain performance.
3) PHP5.1 declares the & for object copying a notice.
No other features are added to PHP until this migration path is complete. I am sure the whole process could have been comleted two years ago if this had been the only goal.
In other words, it's necessary to think two versions ahead so that there is always a valid intermediate state.
For really excellent examples of big release death: Netscape 5, Perl 6.
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Jan 1, 2006, 18:42 #98
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
One big release for lots of breakage is far better than many small breaks.
I dropped PHP4.x development almost over night, and started afresh with PHP5 after a break; I took a lose of income for a month or so but when I look back I have no regrets now.
As for what Marcus is talking about, well I tend to treat his postings nowadays, with a pinch of salt. With small incremental refactorings you still achieve your goal I suppose, it just means it takes longer.
Far better to take the bull by the horns, so to speak, or not at all in my view. Welcome to 2006 btw everyone
-
Jan 1, 2006, 20:26 #99
- Join Date
- Aug 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I like to think of php5 and 4 as meeting the ``two version'' requirement of bazzar development. For new projects I'd definetly have a look at php5, but it really depends on the project. If your just writing simple scripts or are trying to seel something, like other people have said it's best to stick with php4. OO really shows it's grace when you get to bigger projects, and that's where I'd start looking at 5.
For really excellent examples of big release death: Netscape 5, Perl 6.
The projects your talking about seem to be ones that seem to take on too much that they won't get finished. I thought the discussion was about php5 breaking backwards compatibility?
-
Jan 1, 2006, 20:54 #100
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by capiCrimm
The examples lost, or are in the process of losing, their user base. The bigger the upgrade, the more likely they are to jump ship altogether.
Taking a big upgrade in one go means that you have to absorb a large number of fixes in one go, a lot of which may be interdependent. When something breaks you have multiple culprits. You always want to go in small steps with software.
If you want to do a server upgrade to PHP5 (without downtime on multiple servers), you don't want to be changing your code base as well. I'd rather have a transitional code base that I could run side by side on the old servers. Again, I want to know that a failure is a PHP5 technical problem rather than accidents in the code as a result of technical changes.
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
Bookmarks