|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-07-25 16:34 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2014-07-25 16:34 UTC] requinix@php.net
[2014-07-26 01:45 UTC] enadiz at foxmail dot com
-Status: Feedback
+Status: Closed
[2014-07-26 01:45 UTC] enadiz at foxmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
Description: ------------ The example A runs correctly .It's output on browse is like this : int(0) test and the output in file "test.txt" is : 1406285601 The example B doesn't runs correctly .It's output on browse is : int(0) test which with no problem but the output in file "test.txt" is like that : 1406285917 1406285919 it means that all the codes executed twice except the line contains "echo".I try replaced "file_put_contents " to other operation likes mysql's insert ,it still executed twice and the database inserted two records; Test script: --------------- <?php //example A sleep(2); echo 'test'; file_put_contents("test.txt",time()."\r\n", FILE_APPEND); ?> <?php // example B which some codes execute twice var_dump(0); sleep(2); echo 'test'; file_put_contents("test.txt",time()."\r\n", FILE_APPEND); ?>