Skip to content

Commit 404872c

Browse files
committed
Run test edge case
1 parent 99ff52f commit 404872c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
Test count() weird run-test.php edge case
3+
--FILE--
4+
<?php
5+
/**
6+
* Prototype : int count(array|Countable|null $var [, int $mode])
7+
* Description: Count the number of elements in a variable (usually an array)
8+
* Source code: ext/standard/array.c
9+
*/
10+
11+
// TODO Find why this works in an isolated test but not in run-tests
12+
$bork_info = null;
13+
$section_text = array('TEST' => '');
14+
if (
15+
!isset($section_text['PHPDBG'])
16+
&& @count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1
17+
) {
18+
$bork_info = "missing section --FILE--";
19+
}
20+
21+
var_dump($bork_info);
22+
23+
?>
24+
--EXPECT--
25+
string(24) "missing section --FILE--"

0 commit comments

Comments
 (0)