Search code examples
phpeclipsearray-map

array_map showing syntax error in eclipse , but code is working fine


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.


Solution

  • 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.