1--TEST--
2Test function posix_setgid() by substituting argument 1 with float values.
3--SKIPIF--
4<?php
5        PHP_INT_SIZE == 4 or die("skip - 32-bit only");
6        if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
7        if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
8?>
9--CREDITS--
10Marco Fabbri mrfabbri@gmail.com
11Francesco Fullone ff@ideato.it
12#PHPTestFest Cesena Italia on 2009-06-20
13--FILE--
14<?php
15
16
17echo "*** Test substituting argument 1 with float values ***\n";
18
19
20
21$variation_array = array(
22  'float 10.5' => 10.5,
23  'float -10.5' => -10.5,
24  'float 12.3456789000e10' => 12.3456789000e10,
25  'float -12.3456789000e10' => -12.3456789000e10,
26  'float .5' => .5,
27  );
28
29
30foreach ( $variation_array as $var ) {
31  var_dump(posix_setgid( $var  ) );
32}
33?>
34===DONE===
35--EXPECTF--
36*** Test substituting argument 1 with float values ***
37bool(false)
38bool(false)
39
40Warning: posix_setgid() expects parameter 1 to be int, float given in %s on line %d
41bool(false)
42
43Warning: posix_setgid() expects parameter 1 to be int, float given in %s on line %d
44bool(false)
45bool(false)
46===DONE===
47
48