Skip to content

Instantly share code, notes, and snippets.

@preinheimer
Created February 6, 2012 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save preinheimer/1752739 to your computer and use it in GitHub Desktop.
Save preinheimer/1752739 to your computer and use it in GitHub Desktop.
APC Example
<?php
//Run at least two of me in different terminal windows, they count independently
$val = 5;
apc_store('count_key', $val);
while(1)
{
$val = apc_inc('count_key');
echo "APC has: " . $val . "\n";
flush();
sleep(3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment