ZulfadlyAshBurn Posted February 19, 2011 Share Posted February 19, 2011 I would to create my own php class for my website but i dunno the fundamentals of PHP CLASSES. Can anyone teach me how to create and use php class. best if you go into deeper explanations. My main subject is to create a social net site Quote Link to comment https://forums.phpfreaks.com/topic/228205-creating-php-class/ Share on other sites More sharing options...
BlueSkyIS Posted February 19, 2011 Share Posted February 19, 2011 there are many tutorials on this subject. i would start at google.com http://www.google.com/search?client=safari&rls=en&q=php+classes+tutorial&ie=UTF-8&oe=UTF-8 Quote Link to comment https://forums.phpfreaks.com/topic/228205-creating-php-class/#findComment-1176795 Share on other sites More sharing options...
trq Posted February 20, 2011 Share Posted February 20, 2011 How do you know you want a class when you don't even know what they are or how they work? Quote Link to comment https://forums.phpfreaks.com/topic/228205-creating-php-class/#findComment-1177106 Share on other sites More sharing options...
ZulfadlyAshBurn Posted February 20, 2011 Author Share Posted February 20, 2011 my friend said that class are cleaner and sometimes safer Quote Link to comment https://forums.phpfreaks.com/topic/228205-creating-php-class/#findComment-1177118 Share on other sites More sharing options...
redarrow Posted February 20, 2011 Share Posted February 20, 2011 Most people coming from another programming language like using the class format of php, predefined programming in php can also be fast. Both can be written, to do the same thing, in a class format or predefined format. Predefined programming for a absolute beginner, is easer to understand. Saying that each individual are different at there ability to program php code. example I might be good at class never programmed in my life. Try them both is the an saw. Saying even that, Your have to learn all the php commands and there all predefined as examples any way. Most programmers use the php.net manual daily,hourly, to learn examples of php and unfortunately you get the examples in predefined examples from php.net. i personally only use a class when selling a project , only for simplicity only ((not speed or tidiness)). Quote Link to comment https://forums.phpfreaks.com/topic/228205-creating-php-class/#findComment-1177125 Share on other sites More sharing options...
KevinM1 Posted February 20, 2011 Share Posted February 20, 2011 I think the word you're looking for is procedural, not predefined. To the OP, safer how? Both OOP and procedural programming can be messy and unsafe if written badly. Simply creating classes and objects 'just because' doesn't convey any real benefit. OOP done right promotes reusability and modularity, but getting to that point requires more than learning syntax. Quote Link to comment https://forums.phpfreaks.com/topic/228205-creating-php-class/#findComment-1177152 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.