3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class someClass { public function __construct($db) { // this is where you get given the db connection } // your email methods in here public function verify() { // something } } /* To go into the Mage */ protected function someModel($db) { $mailer = new someClass($db); } /* Used like this */ Mage::getInstance()->using('database/someModel')->verify();
based on 0BmvM
Output for 7.0.0 - 7.1.0
Parse error: syntax error, unexpected 'protected' (T_PROTECTED), expecting end of file in /in/klq1c on line 19
Process exited with code 255.
Output for 5.6.0 - 5.6.29
Parse error: syntax error, unexpected 'protected' (T_PROTECTED) in /in/klq1c on line 19
Process exited with code 255.