“Fatal error: Cannot redeclare

前端 未结 17 983
[愿得一人]
[愿得一人] 2020-11-22 05:26

I have a function(this is exactly how it appears, from the top of my file):



        
17条回答
  •  醉梦人生
    2020-11-22 06:03

    or you can't create function in loop

    • such as

      for($i=1; $i<5; $i++) { function foo() { echo 'something'; } }

    foo();
    //It will show error regarding redeclaration

提交回复
热议问题