3v4l.org

run code in 200+ php & hhvm versions
<?php namespace exussum12\CoverageChecker; use XMLReader; class XMLReport { protected $file; public function __construct($file) { $this->file = $file; } public function getCoveredLines() { $coveredLines = []; $reader = new XMLReader; $reader->open($this->file); while ($reader->read()) { if (( $reader->name === "file" && $reader->nodeType == XMLReader::ELEMENT )) { $currentFile = $reader->getAttribute('name'); $coveredLines[$currentFile] = []; } if (( $reader->name === "line" && $reader->getAttribute("type") == "stmt" )) { $coveredLines [$currentFile] [$reader->getAttribute('num')] = (int) $reader->getAttribute("count"); } } return $coveredLines; } }
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/dlHWj
function name:  (null)
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   NOP                                                      
  40     1      > RETURN                                                   1

Class exussum12\CoverageChecker\XMLReport:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/dlHWj
function name:  __construct
number of ops:  4
compiled vars:  !0 = $file
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   9     0  E >   RECV                                             !0      
  11     1        ASSIGN_OBJ                                               'file'
         2        OP_DATA                                                  !0
  12     3      > RETURN                                                   null

End of function __construct

Function getcoveredlines:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Jump found. (Code = 44) Position 1 = 44, Position 2 = 9
Branch analysis from position: 44
Jump found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Jump found. (Code = 46) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
Jump found. (Code = 43) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
Jump found. (Code = 46) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
Jump found. (Code = 43) Position 1 = 31, Position 2 = 41
Branch analysis from position: 31
Jump found. (Code = 44) Position 1 = 44, Position 2 = 9
Branch analysis from position: 44
Branch analysis from position: 9
Branch analysis from position: 41
Branch analysis from position: 30
Branch analysis from position: 22
Branch analysis from position: 15
filename:       /in/dlHWj
function name:  getCoveredLines
number of ops:  46
compiled vars:  !0 = $coveredLines, !1 = $reader, !2 = $currentFile
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  15     0  E >   ASSIGN                                                   !0, <array>
  16     1        NEW                                              $4      :-4
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !1, $4
  17     4        INIT_METHOD_CALL                                         !1, 'open'
         5        FETCH_OBJ_FUNC_ARG                               $7      'file'
         6        SEND_VAR_EX                                              $7
         7        DO_FCALL                                      0          
  18     8      > JMP                                                      ->41
  20     9    >   FETCH_OBJ_R                                      $9      !1, 'name'
        10        IS_IDENTICAL                                     ~10     $9, 'file'
        11      > JMPZ_EX                                          ~10     ~10, ->15
  21    12    >   FETCH_OBJ_R                                      $11     !1, 'nodeType'
        13        IS_EQUAL                                         ~12     $11, 1
        14        BOOL                                             ~10     ~12
        15    > > JMPZ                                                     ~10, ->22
  23    16    >   INIT_METHOD_CALL                                         !1, 'getAttribute'
        17        SEND_VAL_EX                                              'name'
        18        DO_FCALL                                      0  $13     
        19        ASSIGN                                                   !2, $13
  24    20        ASSIGN_DIM                                               !0, !2
        21        OP_DATA                                                  <array>
  28    22    >   FETCH_OBJ_R                                      $16     !1, 'name'
        23        IS_IDENTICAL                                     ~17     $16, 'line'
        24      > JMPZ_EX                                          ~17     ~17, ->30
  29    25    >   INIT_METHOD_CALL                                         !1, 'getAttribute'
        26        SEND_VAL_EX                                              'type'
        27        DO_FCALL                                      0  $18     
        28        IS_EQUAL                                         ~19     $18, 'stmt'
        29        BOOL                                             ~17     ~19
        30    > > JMPZ                                                     ~17, ->41
  33    31    >   INIT_METHOD_CALL                                         !1, 'getAttribute'
        32        SEND_VAL_EX                                              'num'
        33        DO_FCALL                                      0  $21     
  34    34        INIT_METHOD_CALL                                         !1, 'getAttribute'
        35        SEND_VAL_EX                                              'count'
        36        DO_FCALL                                      0  $23     
        37        CAST                                          4  ~24     $23
  32    38        FETCH_DIM_W                                      $20     !0, !2
  33    39        ASSIGN_DIM                                               $20, $21
  34    40        OP_DATA                                                  ~24
  18    41    >   INIT_METHOD_CALL                                         !1, 'read'
        42        DO_FCALL                                      0  $25     
        43      > JMPNZ                                                    $25, ->9
  38    44    > > RETURN                                                   !0
  39    45*     > RETURN                                                   null

End of function getcoveredlines

End of class exussum12\CoverageChecker\XMLReport.

Generated using Vulcan Logic Dumper, using php 7.3.0