C++ preprocessor #define
is totally different.
Is the PHP define()
any different than just creating a var?
define(\"SETTING
php > $cat='';$f=microtime(1);$s='cowcow45';$i=9000;while ($i--){$cat.='plip'.$s.'cow';}echo microtime(1)-$f."\n";
0.00689506530762
php > $cat='';$f=microtime(1);define('s','cowcow45');$i=9000;while ($i--){$cat.='plip'.s.'cow';}echo microtime(1)-$f."\n";
0.00941896438599
This is repeatable with similar results. It looks to me like constants are a bit slower to define and/or use than variables.