I\'ve been examining the code of CodeIgniter and CakePHP and I noticed that some of the methods in their classes are prefixed with an underscore _
or a double u
They are probably magic methods. There is a number of those methods that serve a specific purpose (object constructor, object destructor, getter, setter...)
PHP reserves the __
prefix in function names for those magical functions. It's recommended not to define functions with that prefix for any other purpose.
Update: Both frameworks seem to use the __
prefix for their own purposes as well. See @Gordon's answer.