Return to bug53241.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / file |
1.1 misho 1: --TEST-- 2: Bug #53241 (stream casting that relies on fdopen/fopencookie fails with 'xb' mode) 3: --SKIPIF-- 4: <?php 5: /* unfortunately no standard function does a cast to FILE*, so we need 6: * curl to test this */ 7: if (!extension_loaded("curl")) exit("skip curl extension not loaded"); 8: --FILE-- 9: <?php 10: $fn = __DIR__ . "/test.tmp"; 11: @unlink($fn); 12: $fh = fopen($fn, 'xb'); 13: $ch = curl_init('http://www.yahoo.com/'); 14: var_dump(curl_setopt($ch, CURLOPT_FILE, $fh)); 15: echo "Done.\n"; 16: --CLEAN-- 17: <?php 18: $fn = __DIR__ . "/test.tmp"; 19: @unlink($fn); 20: ?> 21: --EXPECT-- 22: bool(true) 23: Done.