3v4l.org

run code in 300+ PHP versions simultaneously
<?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();
Output for 7.0.0 - 7.0.14, 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.

preferences:
200.87 ms | 1395 KiB | 53 Q