国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Internal function of php custom function

Internal function means that a function is declared inside the function.

Notes:

1. The internal function name cannot be an existing function name

2. Assume that an internal function is defined in function a, You cannot use function a twice.

Let’s look at the code below, you will learn it quickly:

<?php
function foo()
{
   echo '我是函數(shù)foo喲,調(diào)一下我才會(huì)執(zhí)行定義函數(shù)bar的過(guò)程<br />';
 function bar()
 {
      echo '在foo函數(shù)內(nèi)部有個(gè)函數(shù)叫bar函數(shù)<br />';
 }


}

//現(xiàn)在還不能調(diào)用bar()函數(shù),因?yàn)樗€不存在
bar();

foo();

//現(xiàn)在可以調(diào)用bar()函數(shù)了,因?yàn)閒oo()函數(shù)的執(zhí)行使得bar()函數(shù)變?yōu)橐讯x的函數(shù)

bar();

//再調(diào)一次foo()看看是不是會(huì)報(bào)錯(cuò)?
foo();

?>

You will find that a bar function is defined inside the foo() function above, which is the inner function number .

After careful observation and experimentation, you will draw the following conclusions:

1. Calling foo() twice will report an error

2. If you do not adjust the foo() function The bar function cannot be executed because bar is inside foo

Continuing Learning
||
<?php function foo() { echo '我是函數(shù)foo喲,調(diào)一下我才會(huì)執(zhí)行定義函數(shù)bar的過(guò)程<br />'; function bar() { echo '在foo函數(shù)內(nèi)部有個(gè)函數(shù)叫bar函數(shù)<br />'; } } //現(xiàn)在還不能調(diào)用bar()函數(shù),因?yàn)樗€不存在 bar(); foo(); //現(xiàn)在可以調(diào)用bar()函數(shù)了,因?yàn)閒oo()函數(shù)的執(zhí)行使得bar()函數(shù)變?yōu)橐讯x的函數(shù) bar(); //再調(diào)一次foo()看看是不是會(huì)報(bào)錯(cuò)? foo(); ?>
submitReset Code