Categories
development php

Random PHP project progress

Random php development musing

Categories
Uncategorized

PHP array and object addition and string indexing

While reading someone’s code, I came across the following sort of thing: function foo($config = array()) { $this->_config += $config; //… } To which I thought WTF? How does PHP cast an array to a number to perform addition? A few random tests later, it appears PHP joins the two arrays together, only adding indexes […]