一、有条件的函数
<?php
$makefoo = true;
bar();
if ($makefoo) {
}
//if ($makefoo) foo();
function bar()
{
}
?>
输出结果:我爱你
二、函数中的函数
1、<?php
2、function foo()
3、{
4、
5、
6、
7、
8、}
9、foo();
10、bar();
11、?>
这个函数也比较有意思,如果把第九行foo函数去掉,则会产生错误,因为程序找不到bar函数,如果把第十行去掉,虽然没有错误了,但是不能输出任何内容