-2

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

 $rows_tick = array_filter(
                $rows, 
                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 ?

jbduzan
  • 1,106
  • 1
  • 14
  • 30
Khairu Aqsara
  • 1,321
  • 3
  • 14
  • 27
  • 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 – Khairu Aqsara May 15 '12 at 09:47

2 Answers2

3

Anonymous functions comes from php 5.3.

You should write normal function where php < 5.3.

xdazz
  • 158,678
  • 38
  • 247
  • 274
1

From the manual:

PHP version 5.3.0 Anonymous functions become available

Ben Everard
  • 13,652
  • 14
  • 67
  • 96
MrCode
  • 63,975
  • 10
  • 90
  • 112