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); } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9KkV
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   53     0  E > > RETURN                                                   1

Class ZfBugsnag\Service\BugsnagService:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9KkV
function name:  __construct
number of ops:  4
compiled vars:  !0 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        ASSIGN_OBJ                                               'options'
          2        OP_DATA                                                  !0
   19     3      > RETURN                                                   null

End of function __construct

Function sendexception:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 60
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
filename:       /in/p9KkV
function name:  sendException
number of ops:  61
compiled vars:  !0 = $e, !1 = $bugsnag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   30     1        FETCH_OBJ_R                                      ~2      'options'
          2        INIT_METHOD_CALL                                         ~2, 'getEnabled'
          3        DO_FCALL                                      0  $3      
          4      > JMPZ                                                     $3, ->60
   33     5    >   NEW                                              $4      'Bugsnag_Client'
          6        FETCH_OBJ_R                                      ~5      'options'
          7        INIT_METHOD_CALL                                         ~5, 'getApiKey'
          8        DO_FCALL                                      0  $6      
          9        SEND_VAR_NO_REF_EX                                       $6
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $4
   34    12        INIT_METHOD_CALL                                         !1, 'setReleaseStage'
         13        FETCH_OBJ_R                                      ~9      'options'
         14        INIT_METHOD_CALL                                         ~9, 'getReleaseStage'
         15        DO_FCALL                                      0  $10     
         16        SEND_VAR_NO_REF_EX                                       $10
         17        DO_FCALL                                      0          
   35    18        INIT_METHOD_CALL                                         !1, 'setNotifyReleaseStages'
         19        FETCH_OBJ_R                                      ~12     'options'
         20        INIT_METHOD_CALL                                         ~12, 'getNotifyReleaseStages'
         21        DO_FCALL                                      0  $13     
         22        SEND_VAR_NO_REF_EX                                       $13
         23        DO_FCALL                                      0          
   36    24        INIT_METHOD_CALL                                         !1, 'setNotifier'
   37    25        INIT_ARRAY                                       ~15     'ZfBugsnag', 'name'
   38    26        FETCH_CLASS_CONSTANT                             ~16     'ZfBugsnag%5CVersion', 'VERSION'
         27        ADD_ARRAY_ELEMENT                                ~15     ~16, 'version'
   39    28        ADD_ARRAY_ELEMENT                                ~15     'https%3A%2F%2Fgithub.com%2Fnickurt%2Fzf-bugsnag', 'url'
         29        SEND_VAL_EX                                              ~15
   36    30        DO_FCALL                                      0          
   41    31        INIT_METHOD_CALL                                         !1, 'setAppVersion'
         32        FETCH_CLASS_CONSTANT                             ~18     'ZfBugsnag%5CVersion', 'VERSION'
         33        SEND_VAL_EX                                              ~18
         34        DO_FCALL                                      0          
   42    35        INIT_METHOD_CALL                                         !1, 'setAutoNotify'
         36        FETCH_OBJ_R                                      ~20     'options'
         37        INIT_METHOD_CALL                                         ~20, 'getAutoNotify'
         38        DO_FCALL                                      0  $21     
         39        SEND_VAR_NO_REF_EX                                       $21
         40        DO_FCALL                                      0          
   43    41        INIT_METHOD_CALL                                         !1, 'setSendEnvironment'
         42        FETCH_OBJ_R                                      ~23     'options'
         43        INIT_METHOD_CALL                                         ~23, 'getSendEnvironment'
         44        DO_FCALL                                      0  $24     
         45        SEND_VAR_NO_REF_EX                                       $24
         46        DO_FCALL                                      0          
   46    47        INIT_NS_FCALL_BY_NAME                                    'ZfBugsnag%5CService%5Cset_error_handler'
         48        INIT_ARRAY                                       ~26     !1
         49        ADD_ARRAY_ELEMENT                                ~26     'errorHandler'
         50        SEND_VAL_EX                                              ~26
         51        DO_FCALL                                      0          
   47    52        INIT_NS_FCALL_BY_NAME                                    'ZfBugsnag%5CService%5Cset_exception_handler'
         53        INIT_ARRAY                                       ~28     !1
         54        ADD_ARRAY_ELEMENT                                ~28     'exceptionHandler'
         55        SEND_VAL_EX                                              ~28
         56        DO_FCALL                                      0          
   50    57        INIT_METHOD_CALL                                         !1, 'notifyException'
         58        SEND_VAR_EX                                              !0
         59        DO_FCALL                                      0          
   52    60    > > RETURN                                                   null

End of function sendexception

End of class ZfBugsnag\Service\BugsnagService.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.7 ms | 1016 KiB | 15 Q