PHP Speed Tips

A couple tips to enhance performance with PHP and save the Zend Engine milliseconds of extra work. It’s not a huge deal now, but in the long term it pays if …
Video Rating: 4 / 5

About Editor


11 Responses to “PHP Speed Tips”
  1. JREAM says:

    @trippplep Im not sure this has much to do with speed does it?

  2. SBvide0s says:


  3. speoman says:

    @JREAMdesign Cool tips, thanks. Also a nice tip: Use preincrementation
    instead of postincrementation anywhere its possible because
    preincrementation is about 10% faster then postincrementation. Especially
    in for-loops with huge iterations: for ($a = 0; $a < 500000; $a++) { } //standard for ($a = 0; $a < 500000; ++$a) { } //faster!! Notice that $a will also start at 0 inside the parentheses in the ++$a example (and not at 1), so you have not to worry about the indexes of your arrays! :)

  4. trippplep says:

    $person = “friend”; echo “Hello my $person”;

  5. Venistro says:

    Thank you a lot =) *subscribed*

  6. willzurmacht says:

    thank you! :-*

  7. trippplep says:

    also: $person = “friend”; echo “Hello my {$person}”;

  8. cheatonly2win says:

    I made a cache class, pm me if you’re interested in seeing the source code.

  9. JREAM says:

    @trippplep cool man thanks!

  10. Vivek Apollyon says:

    Thanks a lot.

  11. trippplep says:

    @JREAMdesign As a matter of a fact, yes it does. The method I displayed, is
    2-3 times faster at handling strings. The difference is really noticed when
    dealing with large amounts of strings..

Powered by Yahoo! Answers