Hirdetés

Keresés

Új hozzászólás Aktív témák

  • Sk8erPeter

    nagyúr

    válasz Sk8erPeter #6120 üzenetére

    Ja jó, most látom, hogy itt épp az a lényeg, hogy pl. egy tömb minden elemének megváltoztatása esetén milyen rossz eredmények tudnak kijönni a foreach ciklusra a forral szemben, lásd Conclusion:
    "Conclusion:
    Proof in this example shows how functionally murderous the foreach() loop can be."

    DE ez a modify loop-ra vonatkozott.
    Van viszont read loop, ahol gyorsabb a for ciklus.

    "Conclusion:
    In all cases I've found that the foreach loop is substantially faster than both the while() and for() loop procedures. One thing to note is that when using an entire loop from the start it's extremely good to use the reset() function in all examples."

    Érdekes eredmények jönnek ki egyébként minden frissítésnél, pl. több frissítés után már az idézőjel vs. aposztróf kérdés is megfordult.
    "Is a there a difference in using double (") and single (') quotes for strings. Call 1'000x
    [...]
    Conclusion:
    In today's versions of PHP it looks like this argument has been satisfied on both sides of the line. Lets all join together in harmony in this one!"

Új hozzászólás Aktív témák