Php on windows and blocks

My development computer has windows installed. And I experienced the strange php behavior:

<?php file_put_contents('c:/q', microtime(1) . "\r\n", FILE_APPEND); sleep(10); 

When I run this script in a browser simultaneously on two different tabs, I get these results

 1294713622.125 1294713632.2188 

which is clearly not what I expected, although everything is fine in the CLI.

So the question is: what can block execution? ( session.auto_start is Off )

+2
source share
2 answers

The problem is in Firefox. It does not start requests at the same time if the request headers are identical. The problem disappears if network.http.use-cache disabled in the Firefox configuration.

It is a good idea to report this error to mozilla;)

+4
source

microtime () returns the current UNIX timestamp in microseconds. You should expect it to return a different result when you restart it.

0
source

Source: https://habr.com/ru/post/1337243/


All Articles