Take the 2-minute tour ×

im getting this error Parse error: parse error when using this function,

 $rows_tick = array_filter(
                function ($element) use ($date_tick) { 
                    return ($element['ModTime'] <= $date_tick->format("His000"));

am i miss some thing?

when using wampp server with php v 5.3.x it run normaly, but not when using xampp with php 5.2.9,

is it wrong ? when using Anonymous functions in php less than 5.3 ?

share|improve this question
Why not google it first –  Zheng Kai May 15 '12 at 9:44
bit.ly/Kq3OmV –  jbduzan May 15 '12 at 9:46
so sorry, i'm newbe in php, i just got this problem, :( but thanks all for the answer, i just wanna make sure, thats all, thanks –  wenkhairu May 15 '12 at 9:47
add comment

2 Answers

From the manual:

PHP version 5.3.0 Anonymous functions become available

share|improve this answer
add comment

Anonymous functions comes from php 5.3.

You should write normal function where php < 5.3.

share|improve this answer
add comment

Your Answer


