Add binary-search algorithm php version