As the title, I have a script with some functions, when i run that file (on webserver), it will wait all functions to be finished then display all result at one time to screen. I just want to run a function and display its result then do next functions. Example:
<?php
function Fun1(){
echo 'Done 1st func';
sleep(3); //This is run time of Func1
}
function Fun2(){
echo 'Done 2nd func';
sleep(3); //This is run time of Func2
}
function Fun3(){
echo 'Done 3rd func';
}
?>
Then result will be displayed first as:
Done 1st func
After 3s loadtime of Func1, another line added:
Done 2nd func
After 3s loadtime of Func2
Done 3rd func
NOT like that (after 6s wait time):
Done 1st func
Done 2nd func
Done 3rd func
Thanks in advance :)