mrome Posted July 13, 2006 Share Posted July 13, 2006 Does anyone know where I can have a good read about how classes work in php. Because I have a few questions. Do they get held across requests or do they get destroyed once the response has been sent?Why we have an OO way of writing and a procedural way of writing something.Is the OO way faster? smarter? Or is it purely readiblity?If anyone has a good grounding in this topic, please send me a link to some information about it. Quote Link to comment https://forums.phpfreaks.com/topic/14430-php-classes/ Share on other sites More sharing options...
hvle Posted July 13, 2006 Share Posted July 13, 2006 I can answer most (if not all) your questions on OOP.Yes, they got destroyed once script exited. Actually everything got destroyed once the script exited. That's why you need to use SESSIONOOP is wonderfull and best method of programming. If everything in your site is OO and having a nice design structure, you're ahead of everyone else. Quote Link to comment https://forums.phpfreaks.com/topic/14430-php-classes/#findComment-57076 Share on other sites More sharing options...
gewthen Posted July 13, 2006 Share Posted July 13, 2006 [quote author=hvle link=topic=100364.msg396091#msg396091 date=1152757637]OOP is wonderfull and best method of programming. If everything in your site is OO and having a nice design structure, you're ahead of everyone else.[/quote]I thought I would point out that there is no best way of programing. OOP is just one way. There are several different ways of programing anything: functional, declarative, sequential, procedural, and object oriented. All have their strengths. OOP provides the structure for those begining to program as well as any group programers who do not already know each other's style of programing. Once you feel you got a good handle of OOP, move on to other styles. Try not to get stuck on one particular style, for when you can combine them all together you can really do much much more. Quote Link to comment https://forums.phpfreaks.com/topic/14430-php-classes/#findComment-57090 Share on other sites More sharing options...
hvle Posted July 13, 2006 Share Posted July 13, 2006 [quote]functional, declarative, sequential, procedural, and object oriented, you can combine them all together you can really do much much more[/quote]yes, very true. Quote Link to comment https://forums.phpfreaks.com/topic/14430-php-classes/#findComment-57092 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.