[php] adds functionality for label_ids table