ich stelle gerade einige Funktionen aus Performancesgründen als Methode um. Zu einer Funktion, die der liebe Ortwin entwickelt hat, habe ich eine Frage. Bringt eine Umstellung etwas? Bei Messungen konnte ich keine deutliche Verbesserung feststellen. Habe ich einen Denkfehler in meiner Klasse, siehe Code?
Code: Alles auswählen
class MakeCmsType
{
public static function make_cms_type( $container_type, $container_id ) {
$typeGenerator = new cTypeGenerator();
$tmp = $typeGenerator->getGeneratedCmsTag($container_type, $container_id);
$tmp_output = str_replace('\\\"','"',$tmp);
$tmp_output = stripslashes($tmp_output);
return $tmp_output;
}
}
Code: Alles auswählen
$arr = ["CMS_IMGEDITOR[100]","CMS_IMGEDITOR[101]","CMS_IMGEDITOR[102]","CMS_IMGEDITOR[103]","CMS_IMGEDITOR[104]","CMS_IMGEDITOR[105]","CMS_IMGEDITOR[107]","CMS_IMGEDITOR[108]","CMS_IMGEDITOR[109]","CMS_IMGEDITOR[110]","CMS_IMGEDITOR[110]","CMS_IMGEDITOR[111]","CMS_IMGEDITOR[112]","CMS_IMGEDITOR[113]","CMS_IMGEDITOR[114]","CMS_IMGEDITOR[115]","CMS_IMGEDITOR[116]","CMS_IMGEDITOR[117]","CMS_IMGEDITOR[118]","CMS_IMGEDITOR[119]","CMS_IMGEDITOR[120]"];
foreach($arr as $a){
echo $a."<br>";
}
Vielen Dank für eure Hilfe!
VG
Leonhard