3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ZfBugsnag\Service; use \Bugsnag; class BugsnagService { protected $options; /** * __construct * Send the options of the Bugsnag * * @param Object \ZfBugsnag\Options\BugsnagOptions */ public function __construct(\ZfBugsnag\Options\BugsnagOptions $options) { $this->options = $options; } /** * sendException * Send the Exception to the Bugsnag Servers * * @param object \Exception $e */ public function sendException(\Exception $e) { // Check if we have to send the Exception if($this->options->getEnabled()) { // Bugsnag $bugsnag = new \Bugsnag_Client($this->options->getApiKey()); $bugsnag->setReleaseStage($this->options->getReleaseStage()); $bugsnag->setNotifyReleaseStages($this->options->getNotifyReleaseStages()); $bugsnag->setNotifier([ 'name' => 'ZfBugsnag', 'version' => \ZfBugsnag\Version::VERSION, 'url' => 'https://github.com/nickurt/zf-bugsnag' ]); $bugsnag->setAppVersion(\ZfBugsnag\Version::VERSION); $bugsnag->setAutoNotify($this->options->getAutoNotify()); $bugsnag->setSendEnvironment($this->options->getSendEnvironment()); // Set the handler for the exceptions set_error_handler(array($bugsnag, 'errorHandler')); set_exception_handler(array($bugsnag, 'exceptionHandler')); // Send it $bugsnag->notifyException($e); } } }
Output for git.master, git.master_jit, rfc.property-hooks

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
175.63 ms | 405 KiB | 5 Q