Неустранимая ошибка: вызов неопределенной функции array_replace_recursive () для решения CI Controller

я получил ошибку

Неустранимая ошибка: вызов неопределенной функции array_replace_recursive ()

потому что моя php-версия недостаточно высока. Поэтому я ищу решение или альтернативу для запуска array_replace_recursive() для моей текущей версии PHP.

Я использую Codeigniter Controller.

Вот мой код, я надеюсь, что это поможет.

 <?php function paginator($options = array() ) { $keepLive = ''; $sort = (!is_null($this->input->get('sort', true)) ? $this->input->get('sort', true) : ''); $order = (!is_null($this->input->get('order', true)) ? $this->input->get('order', true) : ''); $rows = (!is_null($this->input->get('rows', true)) ? $this->input->get('rows', true) : ''); $search = (!is_null($this->input->get('search', true)) ? $this->input->get('search', true) : ''); $appends = array(); if($sort!='') $keepLive .='&sort='.$sort; if($order!='') $keepLive .='&order='.$order; if($rows!='') $keepLive .='&rows='.$rows; if($search!='') $keepLive .='&search='.$search; // here's my alternatives of array_replace_recursive(). // starts here... $options = array(); $options1= array( 'base_url' => site_url( $this->module ).'?'.$keepLive, 'total_rows' => 0 , 'per_page' => $this->per_page ); foreach($options1 as $key => $val) { $options[$key] = $val; } $toptions = $options; //end's here... /* // so here's the array_replace_recursive() that i need to replace for alternatives. $toptions = array_replace_recursive( array( 'base_url' => site_url( $this->module ).'?'.$keepLive, 'total_rows' => 0 , 'per_page' => $this->per_page, ), $options ); $this->pagination->initialize( $toptions ); */ $this->pagination->initialize( $toptions ); return $this->pagination->create_links(); } ?>