get bounds php/bash