- function_exists: documentation ( source)
- sleep: documentation ( source)
<?php
if(!function_exists('pCount')){
function pCount(){
global $x;
if($x>5){
sleep(1);
pCount();
}else{
$x++;
return;
}
}
}
echo $x."<br>";
pCount();
echo $x."<br>";