rewrite array function for php 5.3 testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>