InManage interview question

Binary search on array in php