We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99ff52f commit 404872cCopy full SHA for 404872c
ext/standard/tests/array/count_weird_behavior_run_test.phpt
@@ -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