Crypt_Base already has a non-static property called mode which is defined at the top of the class and used for the mode of encryption. It also already has a non-static property called engine which signals whether mcrypt should be used or not. Both MUST stay non-static, otherwise this is a step in the wrong direction. This property definition can probably just go, see below.