+ 2

Nested functions?

Can we make nested functions (i.e func in func) in PHP as in Python?

25th Sep 2016, 2:46 PM
Surya Deep Mishra
Surya Deep Mishra - avatar
1 Odpowiedź
+ 2
<?php function main_function() { function sub_function() { return "This is from sub"; } return sub_function(); } echo main_function(); ?>
11th Oct 2016, 4:50 PM
Gerry Suryaputera
Gerry Suryaputera - avatar