File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
ext/standard/tests/streams Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Bug #69900 Commandline input/output weird behaviour with STDIO
6
6
error_reporting (E_ALL );
7
7
8
8
$ fl = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "test69900.php " ;
9
- $ max_ms = (( bool ) getenv ( ' TRAVIS ' ) || ( bool ) getenv ( ' APPVEYOR ' )) ? 10 : 1 ;
9
+ $ max_ms = 10 ;
10
10
11
11
$ test_content = '<?php
12
12
@@ -34,7 +34,13 @@ for($i = 0; $i < 10; $i++){
34
34
$ t1 = microtime (1 );
35
35
36
36
echo $ s ;
37
- echo "fgets() took " , (($ t1 - $ t0 )*1000 > $ max_ms ? 'more ' : 'less ' ), " than $ max_ms ms \n" ;
37
+
38
+ $ dt_ms = ($ t1 - $ t0 )*1000 ;
39
+ if ($ dt_ms > $ max_ms ) {
40
+ echo "fgets() took more than $ max_ms ms ( $ dt_ms ms) \n" ;
41
+ } else {
42
+ echo "fgets() took less than $ max_ms ms \n" ;
43
+ }
38
44
}
39
45
40
46
fclose ($ pipes [0 ]);
@@ -51,7 +57,7 @@ $fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php";
51
57
?>
52
58
--EXPECTF--
53
59
hello0
54
- fgets() took more than %d ms
60
+ fgets() took more than %d ms (%s ms)
55
61
hello1
56
62
fgets() took less than %d ms
57
63
hello2
You can’t perform that action at this time.
0 commit comments