Activity Stream
48,167 MEMBERS
6820 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Hybrid View

litewarez A Snippet from my latest project 17th Jun 2009, 10:11 PM
SplitIce The DBAL (Database class) is quite... 18th Jun 2009, 03:35 AM
litewarez lol yea i aggree with keeping the... 18th Jun 2009, 09:12 AM
Curtis129 Damn i thought i was special :( :P 18th Jun 2009, 10:32 AM
SplitIce I should post some snipets howeaver... 18th Jun 2009, 11:30 AM
litewarez splitice please do id like to see... 18th Jun 2009, 11:38 AM
Plutost damm... everything.. just gone up... 18th Jun 2009, 03:57 PM
SplitIce Ok the code im currently rewirting,... 19th Jun 2009, 03:13 AM
litewarez lmao i sat here looking at this... 19th Jun 2009, 12:45 PM
SplitIce LOL, yeah I copied it from a post I... 20th Jun 2009, 03:04 AM
Dman Nice OOP both of you, would you do... 20th Jun 2009, 09:24 AM
CyberJ37 public function yay(){ echo... 20th Jun 2009, 09:35 AM
SplitIce All depends on which coding... 20th Jun 2009, 10:12 AM
Dman @Cyber - It's what I would call... 21st Jun 2009, 08:54 AM
litewarez i prefer to have the first brace... 20th Jun 2009, 10:32 AM
SplitIce Woot, auto update feature for ddl2... 20th Jun 2009, 10:36 AM
litewarez yea becuase when i open up a code... 21st Jun 2009, 12:00 PM
Dman Also, litewarez, why not use mysqli... 21st Jun 2009, 01:00 PM
SplitIce Mysqli isnt really much better but... 21st Jun 2009, 02:02 PM
litewarez lol yea MySqli is more of a wrapper... 21st Jun 2009, 05:17 PM
Previous Post Previous Post   Next Post Next Post
  1.     
    #1
    Respected Developer
    Website's:
    PlatinumW.org NexusDDL.com HD-United.org CheckLinks.org FLVD.org
    Nice OOP both of you, would you do me a favour and do it like
    Code: 
    public function yay()
    {
        echo 'yay';
    }
    instead of

    Code: 
    public function yay(){
    echo 'yay';
    }
    Makes it very much neater, thanks.
    Dman Reviewed by Dman on . A Snippet from my latest project Ok so this is just an insider to a new project im working on now this project is a professional website that is built on PHP 5.1+ and will not be released under any licence and im not going to be telling you what the site is etc because i like to keep my professional work seperate to my fun work.. aka the scene so here take a look at it mysql.class.php <?php class MySql{ Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    warezxtc.com
    Quote Originally Posted by Dman View Post
    Nice OOP both of you, would you do me a favour and do it like
    Code: 
    public function yay()
    {
        echo 'yay';
    }
    instead of

    Code: 
    public function yay(){
    echo 'yay';
    }
    Makes it very much neater, thanks.
    PHP Code: 
    public function yay(){
        echo 
    'yay';

    is the proper way

  4.     
    #3
    Respected Developer
    Website's:
    X4B.org
    All depends on which coding standard you follow, I sort of have my own which is based of the phpbb3 one but faster (No use of "") and I do it the

    Code: 
    function spam($haxors){
    way.

  5.     
    #4
    Respected Developer
    Website's:
    PlatinumW.org NexusDDL.com HD-United.org CheckLinks.org FLVD.org
    Quote Originally Posted by splitice View Post
    All depends on which coding standard you follow, I sort of have my own which is based of the phpbb3 one but faster (No use of "") and I do it the

    Code: 
    function spam($haxors){
    way.
    @Cyber - It's what I would call improper way. Most of the professional scripts, would do it the way I pointed.
    @splitice - phpbb3 uses the way I pointed. Also, if you are so concerned about speed you should stop using OOP. The way I pointed, hardly makes any difference.
    @litewarez - Amen, different coders have different ways.

  6.     
    #5
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    i prefer to have the first brace after the ) and not on the next line.. just makes thinks easier to read. also i love using tabs to depth my code

    PHP Code: 
    static function get_downloads(){
             return 
    self::downloads(30);

    also the point about the registry system is i prefer to use this as i do ot need to create several instances or clones of an object in other classes as you can directly call it and as for speed theres a catching system the performs first before registry is instantiated etc so obv nobody gets there code right and everybody is different but even tho theres obv a few tweaks o can do to my code its probably faster than most other peoples

    Peace
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  7.     
    #6
    Respected Developer
    Website's:
    X4B.org
    Woot, auto update feature for ddl2 is almost complete.

    1 file install & One click plugin install.

  8.     
    #7
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea becuase when i open up a code file to fix an error or change summit i like to scroll down my code and be able to read it fast, thus time savin and its just how i feel comfortable, and let me say that EVERY WAY IS CORRECT,
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  9.     
    #8
    Respected Developer
    Website's:
    PlatinumW.org NexusDDL.com HD-United.org CheckLinks.org FLVD.org
    Also, litewarez, why not use mysqli instead of mysql?

  10.     
    #9
    Respected Developer
    Website's:
    X4B.org
    Mysqli isnt really much better but not every1 has it, but they always have mysql

  11.     
    #10
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    lol yea MySqli is more of a wrapper for MySql, and by using the comment functions within my own class i can create my connection between MySql and PHP more website specific,

    such as the stdClass i use to return from the class and, not my webiste is built around the base functions mysql_* i just run my own premade functions witch to me thats much easier than using a pre built class thats not specific to my website
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Snippet of the Day
    By SplitIce in forum Web Development Area
    Replies: 41
    Last Post: 26th Aug 2012, 06:09 PM
  2. Plz Help To Add A Php Snippet Into My DLE Index !
    By JoomlaZ in forum Web Development Area
    Replies: 0
    Last Post: 7th Jul 2011, 01:18 PM
  3. BWscene Project - Partners wanted - HUGE project
    By ushare in forum Community Cooperative
    Replies: 0
    Last Post: 4th Mar 2011, 11:18 PM
  4. [C#] Tiny Web Server (snippet)
    By Hyperz in forum Web Development Area
    Replies: 6
    Last Post: 24th Jun 2010, 01:19 PM
  5. See real OOP (Snippet from Litewarez V2) Webmasters CP
    By litewarez in forum Tutorials and Guides
    Replies: 21
    Last Post: 19th Sep 2009, 03:59 PM

Tags for this Thread

BE SOCIAL