1--TEST-- 2Test trim() function : error conditions 3--FILE-- 4<?php 5 6echo "*** Testing trim() : error conditions ***\n"; 7 8$hello = " Hello World\n"; 9echo "\n-- Test trim function with various invalid charlists --\n"; 10var_dump(trim($hello, "..a")); 11var_dump(trim($hello, "a..")); 12var_dump(trim($hello, "z..a")); 13var_dump(trim($hello, "a..b..c")); 14 15?> 16--EXPECTF-- 17*** Testing trim() : error conditions *** 18 19-- Test trim function with various invalid charlists -- 20 21Warning: trim(): Invalid '..'-range, no character to the left of '..' in %s on line %d 22string(14) " Hello World 23" 24 25Warning: trim(): Invalid '..'-range, no character to the right of '..' in %s on line %d 26string(14) " Hello World 27" 28 29Warning: trim(): Invalid '..'-range, '..'-range needs to be incrementing in %s on line %d 30string(14) " Hello World 31" 32 33Warning: trim(): Invalid '..'-range in %s on line %d 34string(14) " Hello World 35" 36