How to locate the PHP code corresponding to a template operator?

I've seen this question for the datetime operator lately on Google+. This is a very common question that has an easy answer whenever you know how the eZ Publish template operators are working internally.

If you look at the tutorial on how to write a template operator in an eZ Publish extension, you'll notice that you have to declare in an array that a given set of template operators is implemented by a given PHP class. This system is valid for extensions but in fact, it's also how the stock template operators are declared. The only difference is where the eztemplateautoload.php files are located. For the stock template operators, those files are in the directories listed in site.ini/[TemplateSettings]/AutoloadPathList[] and not in the autoloads sub-directory of each extension declared in site.ini/[TemplateSettings]/ExtensionAutoloadPath[].

Given that, it's easy to find where the datetime operator is declared for instance with the following command:

$ find . -name eztemplateautoload.php -exec grep -il datetime {} \;
# looking for file named eztemplateautoload.php containing "datetime"
./lib/eztemplate/classes/eztemplateautoload.php

And by looking at this file, you can see that this template operator is implemented by the class eZTemplateLocaleOperator and the autoload file or your favorite IDE will then show you where it is located in the eZ Publish directory.