3v4l.org

run code in 300+ PHP versions simultaneously
<?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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dlHWj
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E > > RETURN                                                   1

Class exussum12\CoverageChecker\XMLReport:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps 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
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 10
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 26, Position 2 = 31
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 42
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 10
Branch analysis from position: 45
Branch analysis from position: 10
Branch analysis from position: 42
Branch analysis from position: 31
Branch analysis from position: 23
Branch analysis from position: 16
filename:       /in/dlHWj
function name:  getCoveredLines
number of ops:  47
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      'XMLReader'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   17     4        INIT_METHOD_CALL                                         !1, 'open'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_OBJ_FUNC_ARG                               $7      'file'
          7        SEND_FUNC_ARG                                            $7
          8        DO_FCALL                                      0          
   18     9      > JMP                                                      ->42
   20    10    >   FETCH_OBJ_R                                      ~9      !1, 'name'
         11        IS_IDENTICAL                                     ~10     ~9, 'file'
         12      > JMPZ_EX                                          ~10     ~10, ->16
   21    13    >   FETCH_OBJ_R                                      ~11     !1, 'nodeType'
         14        IS_EQUAL                                         ~12     ~11, 1
         15        BOOL                                             ~10     ~12
         16    > > JMPZ                                                     ~10, ->23
   23    17    >   INIT_METHOD_CALL                                         !1, 'getAttribute'
         18        SEND_VAL_EX                                              'name'
         19        DO_FCALL                                      0  $13     
         20        ASSIGN                                                   !2, $13
   24    21        ASSIGN_DIM                                               !0, !2
         22        OP_DATA                                                  <array>
   28    23    >   FETCH_OBJ_R                                      ~16     !1, 'name'
         24        IS_IDENTICAL                                     ~17     ~16, 'line'
         25      > JMPZ_EX                                          ~17     ~17, ->31
   29    26    >   INIT_METHOD_CALL                                         !1, 'getAttribute'
         27        SEND_VAL_EX                                              'type'
         28        DO_FCALL                                      0  $18     
         29        IS_EQUAL                                         ~19     $18, 'stmt'
         30        BOOL                                             ~17     ~19
         31    > > JMPZ                                                     ~17, ->42
   33    32    >   INIT_METHOD_CALL                                         !1, 'getAttribute'
         33        SEND_VAL_EX                                              'num'
         34        DO_FCALL                                      0  $21     
   34    35        INIT_METHOD_CALL                                         !1, 'getAttribute'
         36        SEND_VAL_EX                                              'count'
         37        DO_FCALL                                      0  $23     
         38        CAST                                          4  ~24     $23
   32    39        FETCH_DIM_W                                      $20     !0, !2
   33    40        ASSIGN_DIM                                               $20, $21
   34    41        OP_DATA                                                  ~24
   18    42    >   INIT_METHOD_CALL                                         !1, 'read'
         43        DO_FCALL                                      0  $25     
         44      > JMPNZ                                                    $25, ->10
   38    45    > > RETURN                                                   !0
   39    46*     > RETURN                                                   null

End of function getcoveredlines

End of class exussum12\CoverageChecker\XMLReport.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
302.96 ms | 1399 KiB | 13 Q