Return to bug46426.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / streams |
1.1 misho 1: --TEST-- 2: Bug #46426 (3rd parameter offset of stream_get_contents not works for "0") 3: --FILE-- 4: <?php 5: 6: $tmp = tmpfile(); 7: 8: fwrite($tmp, b"12345"); 9: 10: echo stream_get_contents($tmp, 2, 1); 11: echo "\n"; 12: echo stream_get_contents($tmp, -1); 13: echo "\n"; 14: echo stream_get_contents($tmp, -1, 0); 15: echo "\n"; 16: echo stream_get_contents($tmp, -1, 2); 17: echo "\n"; 18: echo stream_get_contents($tmp, 0, 0); 19: echo "\n"; 20: echo stream_get_contents($tmp, 1, 0); 21: echo "\n"; 22: echo stream_get_contents($tmp, -1); 23: 24: @unlink($tmp); 25: 26: ?> 27: --EXPECT-- 28: 23 29: 45 30: 12345 31: 345 32: 33: 1 34: 2345