Skip to content

Instantly share code, notes, and snippets.

@Kogarasi
Created November 16, 2012 11:45
Show Gist options
  • Save Kogarasi/4086692 to your computer and use it in GitHub Desktop.
Save Kogarasi/4086692 to your computer and use it in GitHub Desktop.
[APC Module] no reset internal array pointer in apc_fetch.
<?php
// APC : version 3.1.9
$retval = apc_add('key', array(1,2,3,4,5));
echo $retval; // true
$retval = apc_fetch('key');
var_dump($retval); // array( 1,2,3,4,5 );
var_dump(current($retval)); // error: false
reset($retval);
var_dump(current($retval)); // OK: 1
apc_delete('key');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment