I have 3 php file index.php file contain following code
<?php
include ('file1.php');
include ('file2.php')
?>
file1.php contain
function aa(){
sleep(5);
return 2;
}
function bb(){
sleep(5);
return 1;
}
echo bb();
echo aa();
setStartTrigger($AutoID,3,$db_automation);
file2.php contain same function
function aa(){
sleep(5);
return 2;
}
function bb(){
sleep(5);
return 1;
}
echo bb();
echo aa();
setStartTrigger($AutoID,3,$db_automation);
the output return error
Fatal error: Cannot redeclare aa() (previously declared in C:\xampp\htdocs\automation_kickoff\file2.php:3) in C:\xampp\htdocs\automation_kickoff\file1.php on line 5
i want something without changing any of my function name