MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001479XdebugCode Coveragepublic2017-10-10 22:182017-10-10 22:18
Reportermorozov 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001479: The line containing a boolean value of an array element is not considered covered
DescriptionUsing the same Xdebug version (2.5.5) but depending on the PHP version (5.6 or 7.1), the same line of code is or is not reported as covered.

It looks like it depends on the value type (only the boolean value has this issue while the integer one doesn't).
Steps To ReproduceConsider the following PHP script:

<?php
xdebug_start_code_coverage();

$array = array(
    'int' => 1,
    'bool' => true,
);

var_dump(xdebug_get_code_coverage());
?>

$ php -v
PHP 5.6.31 (cli) (built: Sep 21 2017 13:13:29)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

$ php coverage.php
/home/morozov/coverage.php:10:
array(1) {
  '/home/morozov/coverage.php' =>
  array(4) {
    [6] =>
    int(1)
    [7] =>
    int(1)
    [8] =>
    int(1)
    [10] =>
    int(1)
  }
}

$ php -v
PHP 7.1.9 (cli) (built: Sep 15 2017 19:44:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.9, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

$ php coverage.php
/home/morozov/coverage.php:10:
array(1) {
  '/home/morozov/coverage.php' =>
  array(2) {
    [6] =>
    int(1)
    [10] =>
    int(1)
  }
}
TagsNo tags attached.
Operating System
PHP Version7.1.0-7.1.4
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-10-10 22:18 morozov New Issue


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker