3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class JiraStatusMapper { /** * @var array */ protected static $map = [ 0 => JiraTicketStatus::OPEN, ]; /** * @param int $id * * @return string */ public static function getJiraStatusByPackageStatusId(int $id) { $status = self::$map[$id]; if (!$status) { throw new \OutOfRangeException(); } return $status; } } $x = new \JiraStatusMapper(); var_dump($x::getJiraStatusByPackageStatusId(0));
based on mGcD3
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/14QO2
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  29     1        NEW                                              $2      :-5
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $2
  31     4        INIT_FCALL                                               'var_dump'
         5        FETCH_CLASS                                 512  :5      !0
         6        INIT_STATIC_METHOD_CALL                                  $5, 'getJiraStatusByPackageStatusId'
         7        SEND_VAL_EX                                              0
         8        DO_FCALL                                      0  $6      
         9        SEND_VAR                                                 $6
        10        DO_ICALL                                                 
        11      > RETURN                                                   1

Class JiraStatusMapper:
Function getjirastatusbypackagestatusid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/14QO2
function name:  getJiraStatusByPackageStatusId
number of ops:  11
compiled vars:  !0 = $id, !1 = $status
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  17     0  E >   RECV                                             !0      
  19     1        FETCH_STATIC_PROP_R          global              $2      'map'
         2        FETCH_DIM_R                                      $3      $2, !0
         3        ASSIGN                                                   !1, $3
  21     4        BOOL_NOT                                         ~5      !1
         5      > JMPZ                                                     ~5, ->9
  22     6    >   NEW                                              $6      :-4
         7        DO_FCALL                                      0          
         8      > THROW                                         0          $6
  25     9    > > RETURN                                                   !1
  26    10*     > RETURN                                                   null

End of function getjirastatusbypackagestatusid

End of class JiraStatusMapper.

Generated using Vulcan Logic Dumper, using php 7.3.0