1--TEST-- 2Test convert_uuencode() function : basic functionality 3--FILE-- 4<?php 5 6echo "*** Testing convert_uuencode() : basic functionality ***\n"; 7 8// array with different values for $string 9$strings = array ( 10 11 //double quoted strings 12 "123", 13 "abc", 14 "1a2b3c", 15 "Here is a simple string to test convert_uuencode/decode", 16 "\t This String contains \t\t some control characters\r\n", 17 "\x90\x91\x00\x93\x94\x90\x91\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f", 18 19 //single quoted strings 20 '123', 21 'abc', 22 '1a2b3c', 23 '\t This String contains \t\t some control characters\r\n', 24 25); 26 27// loop through with each element of the $strings array to test convert_uuencode() function 28$count = 1; 29foreach($strings as $string) { 30 echo "-- Iteration $count --\n"; 31 var_dump( convert_uuencode($string) ); 32 $count ++; 33} 34 35 36?> 37--EXPECTF-- 38*** Testing convert_uuencode() : basic functionality *** 39-- Iteration 1 -- 40string(8) "#,3(S 41` 42" 43-- Iteration 2 -- 44string(8) "#86)C 45` 46" 47-- Iteration 3 -- 48string(12) "&,6$R8C-C 49` 50" 51-- Iteration 4 -- 52string(82) "M2&5R92!I<R!A('-I;7!L92!S=')I;F<@=&\@=&5S="!C;VYV97)T7W5U96YC 53*;V1E+V1E8V]D90`` 54` 55" 56-- Iteration 5 -- 57string(74) "M"2!4:&ES(%-T<FEN9R!C;VYT86EN<R`)"2!S;VUE(&-O;G1R;VP@8VAA<F%C 58&=&5R<PT* 59` 60" 61-- Iteration 6 -- 62string(28) "2D)$`DY20D966EYB9FIN<G9Z? 63` 64" 65-- Iteration 7 -- 66string(8) "#,3(S 67` 68" 69-- Iteration 8 -- 70string(8) "#86)C 71` 72" 73-- Iteration 9 -- 74string(12) "&,6$R8C-C 75` 76" 77-- Iteration 10 -- 78string(82) "M7'0@5&AI<R!3=')I;F<@8V]N=&%I;G,@7'1<="!S;VUE(&-O;G1R;VP@8VAA 79+<F%C=&5R<UQR7&X` 80` 81" 82