Parse errors on live

I developed and tested an application on my local machine… everything works perfectly!

When I migrated this to a live server I keep getting all the parsing errors!!

For e.g

I don’t know what is the error on the following code?

Parse error: syntax error, unexpected T_FUNCTION, expecting ‘)’ in /home/content/index.php on line 126

Line 126 is line 3 (starting from items) below


<?php 

    

     $this->widget('bootstrap.widgets.TbCarousel', 

      array(

        'items'=>array_map(function($record){

          return array(

        

            'image' => Yii::app()->baseUrl.'/'.CHtml::encode($record['file_location']),

            'label'=>$this->renderPartial("_frontlabel",array('record'=>$record),true),

            'imageOptions'=>array('style'=>'height: auto; max-height: 1000px; overflow:auto; max-width: 900px;margin-bottom: 0 auto;'),

            

            'itemOptions' => array('class'=>'carousel-inner','style'=>'height:800px;margin-top:0px;margin-left:0px'),

            'captionOptions'=>array('style'=>'background: none repeat scroll 0 0 rgba(0, 0, 0, 0.4);'),

            'caption'=>$this->renderPartial("_frontCaptionContent",array('record'=>$record,'cc'=>new ECurrencyHelper()),true),


            );

        },$dataProvider->getdata()),




        ));

        ?> 

It sounds like the server has a version of PHP earlier than 5.3 installed, which is when anonymous functions were introduced.

Yes Thanks Keith it worked!