Use regular strripos/substr functions

Reduces memory (according to
https://github.com/symfony/WebProfilerBundle/commit/8d96d14f2515b9d9e411ca7b9fe785b95c111cb6)
and should fix #147
Move disable function