1--TEST-- 2php_strip_whitespace() tests 3--FILE-- 4<?php 5 6$filename = dirname(__FILE__)."/php_strip_whitespace.dat"; 7 8var_dump(php_strip_whitespace()); 9var_dump(php_strip_whitespace($filename)); 10 11$data = '/* test comment */'; 12file_put_contents($filename, $data); 13var_dump(php_strip_whitespace($filename)); 14 15$data = '<?php /* test comment */ ?>'; 16file_put_contents($filename, $data); 17var_dump(php_strip_whitespace($filename)); 18 19$data = '<?php 20/* test class */ 21class test { 22 23 /* function foo () */ 24 25 function foo () /* {{{ */ 26 { 27 28 29 echo $var; //does not exist 30 } 31 /* }}} */ 32 33} 34?>'; 35 36file_put_contents($filename, $data); 37var_dump(php_strip_whitespace($filename)); 38 39@unlink($filename); 40echo "Done\n"; 41?> 42--EXPECTF-- 43Warning: php_strip_whitespace() expects exactly 1 parameter, 0 given in %s on line %d 44bool(false) 45 46Warning: php_strip_whitespace(%sphp_strip_whitespace.dat): failed to open stream: No such file or directory in %s on line %d 47string(0) "" 48string(18) "/* test comment */" 49string(9) "<?php ?>" 50string(55) "<?php 51 class test { function foo () { echo $var; } } ?>" 52Done 53