Schlagwort: Best Practice

Wie man Arrays nicht kopieren sollte…

Schon vor einger Zeit fand ich folgendes Schmankerl bei einem Code-Review: for( $i = 0; $i < count($a_shops); $i++ ) { $shop[$i] = $a_shops[$i]; } Nicht nur, dass eine for-Schleife recht ineffizient ist in diesem Kontext, nicht nur, dass das…