Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-15-2016, 08:08 PM   #1
VladS
Available for Coding Work
 
VladS's Avatar
 
Industry Role:
Join Date: Jun 2008
Posts: 1,432
PHP Classes

How often do you use classes in your PHP coding? Abstract? Interface?
__________________
<developer> MechBunny / KVS / PHP / MySQL / HTML5 / CSS3 / jQuery
Email: vlad [at] faxite.com
Telegram: @dangerouscoding
VladS is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-15-2016, 08:29 PM   #2
Coup
🚨 PBBC International 🚨
 
Industry Role:
Join Date: Apr 2010
Location: /👁\
Posts: 9,931
Coup is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-15-2016, 08:36 PM   #3
kkkkkk
svp get banned svp
 
Industry Role:
Join Date: Dec 2005
Posts: 1,628
kkkkkk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-15-2016, 08:46 PM   #4
Google Expert
Webmaster
 
Google Expert's Avatar
 
Industry Role:
Join Date: Jun 2004
Posts: 14,294
Quote:
Originally Posted by VladS View Post
PHP
LOL


Ruby on Rails. Thank me later.
Google Expert is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-15-2016, 08:47 PM   #5
kkkkkk
svp get banned svp
 
Industry Role:
Join Date: Dec 2005
Posts: 1,628
kkkkkk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 03:38 AM   #6
CHMOD
Confirmed User
 
CHMOD's Avatar
 
Join Date: Jun 2003
Posts: 1,697
Quote:
Originally Posted by VladS View Post
How often do you use classes in your PHP coding? Abstract? Interface?

I do not use them at all. In fact, I hate classes.
There is probably something that I didn't get though.
__________________
Sell our Silicone Dolls and make big money!

Our website:
https://www.sexdolls-shop.com/

Signup:
http://www.sexdollscash.com/sliiing/registration.php

Contact:
[email protected]
CHMOD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 03:41 AM   #7
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by CHMOD View Post
I do not use them at all. In fact, I hate classes.
There is probably something that I didn't get though.
I dont see need for them either. Such a fuss about OOP coding and classes, yet not needed in most cases.
Last time when i had need for class was when i need ability to store mutlidimension array based on number, not name, so had to get classes from zend framework to do that.
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 04:33 AM   #8
nightslit
Confirmed User
 
Industry Role:
Join Date: Oct 2013
Location: France
Posts: 226
Well php classes aren't for nothing, but if you aren't programming a webstore I don't see the use... must be something big to program classes.

Concerning sql, mysqli is faster than mysql on bigger tables (in sets of 5000 lines), and safe for sql injection...

May also be a little speed gain, depends on what you are coding...
__________________
email: [email protected] email me for link trades/hardlink exchanges
ICQ : 665974711
my sites: http://hardcoreteenfuck.com
nightslit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 05:37 AM   #9
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by nightslit View Post
Well php classes aren't for nothing, but if you aren't programming a webstore I don't see the use... must be something big to program classes.

Concerning sql, mysqli is faster than mysql on bigger tables (in sets of 5000 lines), and safe for sql injection...

May also be a little speed gain, depends on what you are coding...
Yeah, same goes with using frameworks, unless you are making a big script with a lot of modules, no point in using framework.

And regarding sql, that is a whole different subject which can be discussed infinitely .
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 05:46 AM   #10
Ferus
Bye - Left to do stuff
 
Industry Role:
Join Date: Feb 2013
Posts: 4,108
IF you are reusing your code in many applications with a little complexity, I would use classes.

I am glad I went through 2 weeks of basic OOP programming (c#) because it have saved me a lot of time.
Ferus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 06:43 AM   #11
yuu.design
Too lazy to set a custom title
 
yuu.design's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Argentina
Posts: 25,924
Quote:
Originally Posted by Coup View Post
hahahah, mean guy!
__________________
Beautiful And Usable Web Design Creations For The Adult Industry Since 2003
I'm Yuu, Designer and Content Producer

Paysites - Affiliate Programs - Dating & Cam Sites - Mainstream Projects - Tube Sites - Banners - Wordpress Themes - NATs integration - Landing Pages

Check my Portfolio and Content Production Offers
yuu.design is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 08:43 AM   #12
HomerSimpson
Too lazy to set a custom title
 
HomerSimpson's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
There are two ways of doing PHP:
- the old way (basically php3/php4) where no classes are used and everything is basically in functions and you just call them when you need them
- the new way (OOP in php5/php6) and it's mostly used in combination with various MVC frameworks (CodeIgniter, Yii, phpFuel, Cake, Angular) and this is very useful when: you will need to reuse the part of the code, when several people work on same project, when someone doesn't have to read all your functions before it can start some coding etc...

Don't make me wrong, classes in php aren't new, but lately their use in projects increased as language developed and people wanted to fully move to OOP.

Here's one useful php link: PHP: The Right Way
__________________
Make a bank with Chaturbate - the best selling webcam program
Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:
HomerSimpson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 11:56 AM   #13
VladS
Available for Coding Work
 
VladS's Avatar
 
Industry Role:
Join Date: Jun 2008
Posts: 1,432
I don't use classes too much myself either, 90% of the case my own framework functions based does the job and does it well, but lately everyone and their moms want frameworks, classes and OOP. Which is not a bad thing, but imo it's overkill in most of the cases.
__________________
<developer> MechBunny / KVS / PHP / MySQL / HTML5 / CSS3 / jQuery
Email: vlad [at] faxite.com
Telegram: @dangerouscoding
VladS is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2016, 12:25 PM   #14
matureisland
Confirmed User
 
Industry Role:
Join Date: Sep 2013
Posts: 278
I use classes... I don't use php...��
matureisland is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2016, 05:25 AM   #15
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
only when i am copying something from github...
else i play with functions directly.,
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2016, 02:51 AM   #16
Relic
So Fucking Banned
 
Join Date: Aug 2002
Posts: 10,300
Never, fuck classes.
Relic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-20-2016, 08:34 AM   #17
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,270
when im doing wordpress stuff, i usally only use them in plugins, never in themes.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-20-2016, 09:48 AM   #18
ina.susie
Registered User
 
Industry Role:
Join Date: Dec 2014
Posts: 13
I, as a beginner, sometimes use codeacademy classes but usually forums
ina.susie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-20-2016, 11:37 AM   #19
Why
MFBA
 
Industry Role:
Join Date: Mar 2003
Location: PNW
Posts: 7,230
i take it most of you aren't working on very large or modern php projects.

you should be using classes anytime you are writing more then just a quick script. once you get used to OOP PHP its pretty easy to follow. these are things you will want to know and learn if you plan to jump to other languages as well.
Why is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
php, classes, coding, abstract, interface



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.