Function within Function
Well i have been coding in C++ and C# for quite a long
What i really ought to know was that you cannot define a function with in a function!
I axiomatically thought that the rule would imply to all of the languages! But i was wrong!
In php you can do functions with in function so as with PASCAL!
<?php
function myfunc($a)
{
function func2($b)
{
function func3($c)
{
echo “I got “.$c;
}
echo “I got “.$b;
func3(“asdfasdf “);
}
echo “I got “.$a;
func2(“asdf”);
}
myfunc(“abc”);
?>
and the out put would be
X-Powered-By: PHP/5.2.0
Content-type: text/html
I got abcI got asdfI got asdfasdf
Creepy!!
Advertisements
=D aakhir kaar, aap nay maan hi lia 😛
“I axiomatically thought that the rule would imply to all of the languages!”
That was bad of me 🙂
wow that’s so creepy rofl.
顶~~~~我叫剑侠世界资料站,希望能交个朋友哈!