I was looking how to improve performance of Slim’s Http\Cookies::parseHeader() function: as a C developer I find it rather non-optimal because it uses regular expressions and excessive memory allocations. I wondered it it is possible to use the same optimizations that I would use in C and if it gives any benefit.