{"action":"created","issue":{"url":"https://api.github.com/repos/krakjoe/apcu/issues/164","labels_url":"https://api.github.com/repos/krakjoe/apcu/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/krakjoe/apcu/issues/164/comments","events_url":"https://api.github.com/repos/krakjoe/apcu/issues/164/events","html_url":"https://github.com/krakjoe/apcu/issues/164","id":125631699,"number":164,"title":"apc_inc() Can take minutes on PHP7, PHP5 is OK","user":{"login":"vojta","id":198708,"avatar_url":"https://avatars.githubusercontent.com/u/198708?v=3","gravatar_id":"","url":"https://api.github.com/users/vojta","html_url":"https://github.com/vojta","followers_url":"https://api.github.com/users/vojta/followers","following_url":"https://api.github.com/users/vojta/following{/other_user}","gists_url":"https://api.github.com/users/vojta/gists{/gist_id}","starred_url":"https://api.github.com/users/vojta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vojta/subscriptions","organizations_url":"https://api.github.com/users/vojta/orgs","repos_url":"https://api.github.com/users/vojta/repos","events_url":"https://api.github.com/users/vojta/events{/privacy}","received_events_url":"https://api.github.com/users/vojta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-08T15:24:55Z","updated_at":"2016-01-09T13:30:45Z","closed_at":"2016-01-08T17:23:52Z","body":"This issue effectively stopped our website. Tested on Centos6.\r\n\r\n```\r\n$ php -v\r\nPHP 5.5.30 (cli) (built: Oct  1 2015 09:29:18) \r\n\r\n$ php ./apcu_inc.php \r\nIncrement: 1000000; time: 0 sec\r\nIncrement: 11000000; time: 0 sec\r\nIncrement: 21000000; time: 0 sec\r\nIncrement: 31000000; time: 0 sec\r\nIncrement: 41000000; time: 0 sec\r\nIncrement: 51000000; time: 0 sec\r\nIncrement: 61000000; time: 0 sec\r\nIncrement: 71000000; time: 0 sec\r\nIncrement: 81000000; time: 0 sec\r\nIncrement: 91000000; time: 0 sec\r\n\r\n$ php70 -v\r\nPHP 7.0.2 (cli) (built: Jan  6 2016 14:50:05) ( NTS )\r\n\r\n$ php70 ./apcu_inc.php \r\nIncrement: 1000000; time: 0.003 sec\r\nIncrement: 11000000; time: 0.032 sec\r\nIncrement: 21000000; time: 0.059 sec\r\nIncrement: 31000000; time: 0.08 sec\r\nIncrement: 41000000; time: 0.107 sec\r\nIncrement: 51000000; time: 0.133 sec\r\nIncrement: 61000000; time: 0.161 sec\r\nIncrement: 71000000; time: 0.187 sec\r\nIncrement: 81000000; time: 0.201 sec\r\nIncrement: 91000000; time: 0.227 sec\r\n```\r\n\r\nTest script:\r\n\r\n```php\r\n<?php\r\n$cName = 'counter_' . rand();\r\n\r\napc_add($cName, 0);\r\n\r\nfor ($i = 1; $i <= 100; $i += 10) {\r\n    $inc = 1000000 * $i;\r\n\r\n    $t = microtime(true);\r\n\r\n    apc_inc($cName, $inc);\r\n\r\n    print(\"Increment: \" . $inc . \"; time: \" . round(microtime(true) - $t, 3) . \" sec\" . PHP_EOL);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/krakjoe/apcu/issues/comments/170240153","html_url":"https://github.com/krakjoe/apcu/issues/164#issuecomment-170240153","issue_url":"https://api.github.com/repos/krakjoe/apcu/issues/164","id":170240153,"user":{"login":"bwoebi","id":3154871,"avatar_url":"https://avatars.githubusercontent.com/u/3154871?v=3","gravatar_id":"","url":"https://api.github.com/users/bwoebi","html_url":"https://github.com/bwoebi","followers_url":"https://api.github.com/users/bwoebi/followers","following_url":"https://api.github.com/users/bwoebi/following{/other_user}","gists_url":"https://api.github.com/users/bwoebi/gists{/gist_id}","starred_url":"https://api.github.com/users/bwoebi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwoebi/subscriptions","organizations_url":"https://api.github.com/users/bwoebi/orgs","repos_url":"https://api.github.com/users/bwoebi/repos","events_url":"https://api.github.com/users/bwoebi/events{/privacy}","received_events_url":"https://api.github.com/users/bwoebi/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T13:30:45Z","updated_at":"2016-01-09T13:30:45Z","body":"Aren't you then supposed to mark the variable as volatile to avoid register optimization? using static seems very strange to me..."}}