Question: which one of the 2 have the best performance?

In javascript I was heard douglas crockford say that you shouldn't use str += if you are concatenating a large string but use array.push instead.

I've seen lots of code where developers use $str .= to concatenate a large string in PHP as well, but since "everything" in PHP is based on arrays (try dumping an object), my thought was that the same rule applies for PHP.

Can anyone confirm this?

Answer: 
Strings are mutable in PHP so using .= does not have the same affect in php as using += in javascript. That is, you will not not end up with two different strings every time you use the operator. 

See:

[php String Concatenation, Performance](https://stackoverflow.com/questions/124067/php-string-concatenation-performance)
[Are php strings immutable?](https://stackoverflow.com/questions/496669/are-php-strings-immutable)
`.=` is for strings.

[`array_push()`](http://us2.php.net/manual/en/function.array-push.php) is for arrays.

They aren't the same thing in PHP. Using one on the other will generate an error.