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