Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,171,847 members, 7,882,967 topics. Date: Sunday, 07 July 2024 at 08:16 PM

Php Oop Questions..please Help - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Php Oop Questions..please Help (1363 Views)

How Can I Generate Unique Random Num Wt Php Oop / I Want To Learn Php Oop! Prescribe An Ebook / Why Is OOP PHP So Confusing? (2) (3) (4)

(1) (Reply) (Go Down)

Php Oop Questions..please Help by cr80vity(m): 11:02am On Feb 01, 2016
these are d questions...pls explain 2 me 1) d function of implode 2) essence of __construct 3) function of $this 4) function of getInstance
Re: Php Oop Questions..please Help by DonSegmond(m): 1:22pm On Feb 01, 2016
cr80vity:
these are d questions...pls explain 2 me
1) d function of implode
2) essence of __construct
3) function of $this
4) function of getInstance
do you know about php.net?

1) how to use implode, http://php.net/manual/en/function.implode.php

2) __construct is a constructor, if you don't know OOP, then I urge you to get a good book. A constructor is automatically called by the system every time an object is instantiated. I hope you know what an object and instantiation is. But if you don't, PHP classes & Objects are defined here. http://php.net/manual/en/language.oop5.php I will yet again urge you to work through a book.

3) $this is used to refer to the current object, within the object's methods.

4) getInstance is not built into php, but a way to get an instance of a class is to instantiate one, using the new keyword, this is common to most OOP languages. You will usually find a getInstance method used within a design pattern.
Re: Php Oop Questions..please Help by cr80vity(m): 3:33pm On Feb 01, 2016
DonSegmond:

do you know about php.net?

1) how to use implode, http://php.net/manual/en/function.implode.php

2) __construct is a constructor, if you don't know OOP, then I urge you to get a good book. A constructor is automatically called by the system every time an object is instantiated. I hope you know what an object and instantiation is. But if you don't, PHP classes & Objects are defined here. http://php.net/manual/en/language.oop5.php I will yet again urge you to work through a book.

3) $this is used to refer to the current object, within the object's methods.

4) getInstance is not built into php, but a way to get an instance of a class is to instantiate one, using the new keyword, this is common to most OOP languages. You will usually find a getInstance method used within a design pattern.

thanks alot...but since it seeming hard, shld I just learn d normal php nd I use mysqli for d DB
Re: Php Oop Questions..please Help by fattbabakay(m): 3:44pm On Feb 01, 2016
cr80vity:


thanks alot...but since it seeming hard, shld I just learn d normal php nd I use mysqli for d DB
just Learn it...seems hard at first tho...u will soon get it
Re: Php Oop Questions..please Help by CRAZYMADMAN(m): 6:12pm On Feb 01, 2016
OOP php ain't esy to come to terms with Bro. I remember when I journeyed through that wilderness, but with determination, you'll pass (Halllalujah Somborii! ).

Seriously though, it's the way forward and I seriously doubt that there are many popular php scripts that aren't written (at least in part ) In OOP
Re: Php Oop Questions..please Help by ChinenyeN(m): 7:32pm On Feb 01, 2016
cr80vity:
thanks alot...but since it seeming hard, shld I just learn d normal php nd I use mysqli for d DB

You're certainly free to take the procedural route. After all, PHP is really a procedural language. However, if you're looking long-term, some familiarity with OOP is advisable. Even more so, with the introduction of PDO, it is likely that mysqli will be deprecated soon enough. The key is to not rush your learning process. Take it a project at a time. For instance, your entire PHP code can be procedural, but you can mix a little bit of OOP in here and there as you learn it and as it seems fit.

A starting point for mixing would be to use PDO for your database connection but keep the rest of your PHP code normal (a.k.a procedural).
Re: Php Oop Questions..please Help by CALEB65(m): 8:35am On Feb 03, 2016
OOP if not that easy, i'm still learning it, i jst got a very good book that's putting me thru...
this->oop aint funny, you need to be very attentive; else u get confused
Re: Php Oop Questions..please Help by cr80vity(m): 12:24pm On Feb 03, 2016
CALEB65:
OOP if not that easy, i'm still learning it, i jst got a very good book that's putting me thru...
this->oop aint funny, you need to be very attentive; else u get confused
lol...pls wch book s dat so I can download it
Re: Php Oop Questions..please Help by CALEB65(m): 3:57pm On Feb 03, 2016
cr80vity:
lol...pls wch book s dat so I can download it
programming php by kevin tatroe, peter macintyre & rasmus lerdorf.. i forgot where i got it bt the link written in it is www.it-ebooks.info

(1) (Reply)

Learn Programming In Just 1 Month. / Is Nairaland Still Holding Challenges / Code Java Like A Pro

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.