Answer the question
In order to leave comments, you need to log in
PHP. Are strings or arrays faster?
I have been thinking for a very long time which is better to use. PHP doesn't have StringBuffer or StringBuilder like Java/C#
does .
So which is faster:
$array = array();
$array[] = 'First ';
$array[] = 'Second ';
$array[] = 'Three';
// в конце implode
// или
$str = '';
$str .= 'First ';
$str .= 'Second ';
$str .= 'Three';
Answer the question
In order to leave comments, you need to log in
It will be faster with a template engine. Because it will be faster to develop, and no one cares how long it usually takes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question