|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-30 10:13 UTC] felipe@php.net
[2010-02-17 00:23 UTC] joey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
Description: ------------ php 5.2.0 I want get the string from begin to the end ("12345") but return empty when set offset to 0 Reproduce code: --------------- <?PHP $tmp = tmpfile(); fwrite($tmp, "12345"); //rewind($tmp); echo "---\n"; echo stream_get_contents($tmp, -1, 0); echo "\n"; echo stream_get_contents($tmp, -1, 1); echo "\n"; echo stream_get_contents($tmp, -1, 2); echo "\n---"; ?> Expected result: ---------------- --- 12345 2345 345 --- Actual result: -------------- --- 2345 345 ---