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