Search code examples
phpperformancebenchmarkinggettext

How can I benchmark the resources used by GETTEXT for language support in PHP?


Not long ago I was playing around with GETEXT in PHP for language files and doing a lot of research on the best way to offer multilingual support in a PHP app, it seems the general consensus was to use GETEXT instead of arrays or constants or any of the other options.

I often look over big name projects code like wordpress, vbulletin, phpbb, and other PHP based applications that are used by many people and can handle a lot of traffic generally. The results I found were that most of these do not use GETEXT, most of them just do language files with ARRAYS in them.

So I am wanting to know, how can I benchmark the performance of using GETEXT? Including speed and memory+resources used?


Solution

  • Benchmarking PHP Localization – Is gettext fast enough?


    alt text


    How can I benchmark the performance of using GETEXT? Including speed and memory+resources used?

    Using microtime(true) and memory_get_usage().