Guten Tag,
Das wäre mal ein Test wert....
Überraschenderweise war str_replace() minimal schneller als nl2br() (bei gleichem Funktionsumfang):
----------------------------------------------------------
marker time index ex time perct
----------------------------------------------------------
Start 1248024924.58426400 - 0.00%
----------------------------------------------------------
End nl2br() 1248024933.24032300 8.656059 51.38%
----------------------------------------------------------
Stop 1248024941.42981600 8.189493 48.62%
----------------------------------------------------------
total - 16.845552 100.00%
----------------------------------------------------------
Ergibt 51.38% für nl2br(), 48.62% für str_replace().
Skripte - benötigt PEAR/Benchmark.
Gruß
Christoph Jeschke
Zend Certified Engineer
Certified Urchin Admin