Bug #67683 [NEW]: var_dump() makes the following codes execute twice

From: Date: Fri, 25 Jul 2014 11:12:00 +0000
Subject: Bug #67683 [NEW]: var_dump() makes the following codes execute twice
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186812@lists.php.net to get a copy of this message
From: enadiz at foxmail dot com Operating system: Linux 3.13.0-24-generic #Ubuntu PHP version: 5.5.15 Package: Output Control Bug Type: Bug Bug description: var_dump() makes the following codes execute twice 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); ?> -- Edit bug report at https://bugs.php.net/bug.php?id=67683&edit=1 --

« previous php.bugs (#186812) next »