1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What is the fastest programmming to run and connect to PHP

Discussion in 'PHP' started by TheSyndicate, Feb 16, 2017.

  1. #1
    Is there a special way to write PHP to make it faster?
     
    TheSyndicate, Feb 16, 2017 IP
  2. MCMatt

    MCMatt Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Can you be more specific to what you're doing? Typically I find that sloppy code along with bad practices decrease the efficiency of PHP. Now if you're using a database such as MYSQL.. that's a whole different path we can go down.
     
    MCMatt, Feb 16, 2017 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #3
    You mean to make the code execute faster?

    There are lots of little things and you may need to write several copies of the same functionality and speed test it. Typically what I'd do is put it a for($i = 0; $i < 1000; i++) loop and see how long it takes to run it x thousand times as the speed difference will be tiny for a single run.

    Your big, easy gains in performance will be in your database queries. Don't be afraid to request what you need, just make sure the queries are written right. I had a massive query that was slow, or it could actully kill the server. Changed one part of it and it runs really, really fast.
     
    sarahk, Feb 16, 2017 IP
  4. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #4
    Ok so what is the latest most advanced way to do php and database what should i ask for when i get someone to write code for me. Since some might old sloppy php
     
    TheSyndicate, Feb 16, 2017 IP
  5. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #5
    You make sure they write code that runs without warnings, notices and errors on the latest version of PHP (7.1.x) - that way, the code will at least not be using deprecated functions like mysql_ and other implementations. Make sure that every query is prepared, and make sure that code is formatted and is using modern concepts, and PHP 5.6+ / 7+ syntax.

    The point is, if you know next to nothing about code, there will be no way for you to really know if the code does what it does in an effective way or not. I suggest you, after you start up the project, drop some of the code you have written for you here, so we can have a look. Smaller functions, or classes might tell us at least a bit about the quality of the code you have received.
     
    PoPSiCLe, Feb 16, 2017 IP
  6. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #6
    This is bootstrap and java i guess? can use with php or is it a totally otherway to build a site=

    div ng-view class="full-height"></div>
    
    
    <script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
    
    <script type="text/javascript" src="http://underscorejs.org/underscore-min.js" ></script>
    <script src="/js/dependencies/sails.io.js"
            autoConnect="false"
            environment="production"
            headers='{ "x-csrf-token": "null" }'>
    </script>
    
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.10//angular-route.min.js"></script>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular-cookies.min.js"></script>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular-resource.min.js"></script>
    
    <script type="text/javascript" src="/js/raphael.js"></script>
    <script type="text/javascript" src="/js/morris.js"></script>
    <script type="text/javascript" src="/js/modules/event/event.js"></script>
    <script type="text/javascript" src="/js/modules/jq/jq.js"></script>
    <script type="text/javascript" src="/js/modules/keypress/keypress.js"></script>
    
    
    <script type="text/javascript" src="/js/Flot/jquery.flot.js"></script>
    <script type="text/javascript" src="/js/Flot/flot.tooltip/js/jquery.flot.tooltip.min.js"></script>
    <script type="text/javascript" src="/js/Fl
    Code (JavaScript):
     
    TheSyndicate, Feb 16, 2017 IP
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #7
    You'll find plenty of people who are very anti the "bloat" you get with bootstrap - and it uses Javascript, not Java (they are completely different things)

    The only way you can vet progress is by asking for code samples and then seeing if you can understand what they're doing and why and that will involve some learning on your part. If you can't, or don't want to learn (no time, not interested etc) then you may want to pay a bit more to have the confidence that the person doing the work is qualified.
     
    sarahk, Feb 16, 2017 IP
  8. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #8
    There's nothing wrong with Bootstrap.. some of the largest web sites that receive millions and millions of visitors use it. Those visitors don't have issues with it.. the only people who have issues with it are developers and designers that think their small penises become smaller by using anything written by someone smarter than them. These types of geektards (geek + retard) are often self employed because no legitimate company will hire them as they turn 1 week tasks in to 6 month development projects just so they can say "I built my untested code better!!".

    I am serious. If bootstrap is going to save you time, provide structure and your end product will look better then by all means use it. It's not as "bloated" as people make it out to be once you optimize for it (ie exclude what you don't use). And even in it's original entirety 99.999% of devices render the pages just fine with virtually no difference from a page that doesn't use it.

    Again... work smart. Time is way more valuable.
     
    NetStar, Feb 16, 2017 IP
  9. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #9
    Yes i am trying to learn the best fastest code in PHP possible before hire someone.
     
    TheSyndicate, Feb 17, 2017 IP