2

I'm working with codeIgniter, and when I use PHP function array_map, it shows a syntax error, but the code is working fine. Is array_map a deprecated function?

Why is this happening?

enter image description here

Should I avoid using array_map? Thanks in advance.

MC Emperor
  • 22,334
  • 15
  • 80
  • 130
Kanishka Panamaldeniya
  • 17,302
  • 31
  • 123
  • 193
  • 4
    You can only define a function like that in PHP 5.3+. Does your Eclipse know you're running PHP 5.3+? – Explosion Pills Jan 24 '13 at 05:50
  • 2
    see this [link](http://stackoverflow.com/questions/9608747/php-5-4-interpreter-for-eclipse-pdt) to update your PHP interpreter. – mamdouh alramadan Jan 24 '13 at 07:51
  • 1
    @mamdouhalramadan: care to post this as an answer. Or Kanishka, you can post your own answer. Best to have an answer. The question shows as resolved. – DWright Jan 24 '13 at 08:09

1 Answers1

3

As Explosion Pills mentioned in his comment

You can only define a function like that in PHP 5.3+.

so you should update your PHP interpreter in eclipse. and to do that here's a post that will help you. PHP interpreter for eclipse.

Community
  • 1
  • 1
mamdouh alramadan
  • 8,349
  • 6
  • 36
  • 53