1--TEST-- 2Test function posix_ttyname() by substituting argument 1 with emptyUnsetUndefNull 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 9if (!extension_loaded('posix')) { 10 die('SKIP The posix extension is not loaded.'); 11} 12?> 13--FILE-- 14<?php 15 16 17echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n"; 18 19 20 21$unset_var = 10; 22unset($unset_var); 23 24$variation_array = array( 25 'unset var' => @$unset_var, 26 'undefined var' => @$undefined_var, 27 'empty string DQ' => "", 28 'empty string SQ' => '', 29 'uppercase NULL' => NULL, 30 'lowercase null' => null, 31 ); 32 33 34foreach ( $variation_array as $var ) { 35 var_dump(posix_ttyname( $var ) ); 36} 37?> 38--EXPECT-- 39*** Test substituting argument 1 with emptyUnsetUndefNull values *** 40bool(false) 41bool(false) 42bool(false) 43bool(false) 44bool(false) 45bool(false) 46