summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/readgzfile_variation4.phpt
blob: ece84a990e7a4f64b96b866bd2fdd8b054678c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--TEST--
Test function readgzfile() by substituting agument 1 with float values.
--SKIPIF--
<?php
if (!extension_loaded(zlib)) die ('skip zlib extension not available in this build');
?>
--FILE--
<?php


$use_include_path = false;


$variation = array(
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,
  );


foreach ( $variation as $var ) {
  var_dump(readgzfile( $var ,  $use_include_path ) );
}
?>
===DONE===
--EXPECTF--
Warning: readgzfile(10.5): failed to open stream: No such file or directory in %s on line %d
bool(false)

Warning: readgzfile(-10.5): failed to open stream: No such file or directory in %s on line %d
bool(false)

Warning: readgzfile(123456789000): failed to open stream: No such file or directory in %s on line %d
bool(false)

Warning: readgzfile(-123456789000): failed to open stream: No such file or directory in %s on line %d
bool(false)

Warning: readgzfile(0.5): failed to open stream: No such file or directory in %s on line %d
bool(false)
===DONE===