- function_exists: documentation ( source)
- define: documentation ( source)
<?php
if(!function_exists('action')){
function action($i){
}
}
$loops= 100000;
$test = Array(); $test['define']=false; $test['var']=true;
if($test['define']){
define('DEBUG' , true);
for($i=0; $i<$loops; $i++){
if(DEBUG){ action($i); }
if(!DEBUG){ action($i); }
}
}
if($test['var']){
$DEBUG = true;
for($i=0; $i<$loops; $i++){
if($DEBUG){ action($i); }
if(!$DEBUG){ action($i); }
}
}