At Thumbtack, we do most of our work in PHP and Python. Our website is written in PHP, and much behind-the-scenes is written in Python. Because we are constantly working in both languages, we often run into features of one language that we wish we could have in the other. In particular there were 3 features of Python that we really wanted in PHP: string slicing, string startswith, and string endswith. We recently wrote equivalent functions in PHP and added them to our source tree, and in that time they have been used many times, saving time and increasing code readability.
Feel free to use any or all of these functions in your own project.