My life be like

PHP call to undefined function mb_strtolower

Published at: 2019-01-08

Picture you have 2 projects that have the same dependency to another repository. In 1 of the projects I kept getting the error Fatal error: Call to undefined function mb_strtolower(). I tried to debug it and found the method was used in a method of the dependency. In another project on the same server the method was found. The internet says that the method uses mb_string extension for PHP but how was it working in another project?

After some debugging and searching I found that 1 project had a symfony that registered a method mb_strtolower. It was a polyfill!

Conclusion: always be aware of the dependencies that you have an I’ll never use a polyfill again. I think it’s just a quick fix for the problem that you are scared to update some other dependency.

Oscar te Giffel

Oscar te Giffel. I wan't to learn so many things. This is just my journey through life.