Skip to content

Instantly share code, notes, and snippets.

@mcdruid
Created November 4, 2014 10:38
Show Gist options
  • Save mcdruid/13d17048f5fc3bc69c84 to your computer and use it in GitHub Desktop.
Save mcdruid/13d17048f5fc3bc69c84 to your computer and use it in GitHub Desktop.
list of opcache GUIs
<?php
$files = array(
'opcache.php' => array(
'project' => 'https://github.com/rlerdorf/opcache-status',
'download' => 'wget --no-check-certificate https://raw.githubusercontent.com/rlerdorf/opcache-status/master/opcache.php',
),
'ocp.php' => array(
'project' => 'https://gist.github.com/ck-on/4959032',
'download' => 'wget https://gist.github.com/ck-on/4959032/raw/0b871b345fd6cfcd6d2be030c1f33d1ad6a475cb/ocp.php',
'notes' => 'Need to comment out the check for <em>count(get_included_files())>1</em> near the start to make this work on Acquia hosting at present.',
),
'opcache-gui.php' => array(
'project' => 'https://github.com/amnuts/opcache-gui',
'download' => 'wget --no-check-certificate https://raw.github.com/amnuts/opcache-gui/master/index.php -O opcache-gui.php'
),
);
?>
<html>
<head>
<title>opcache GUIs</title>
<style>
li li { font-size: 70%; }
</style>
<head>
<body>
<?php
if (function_exists('opcache_get_status')) {
print "</p><strong>Looks like opcache is present on this server.</strong></p>" . PHP_EOL;
}
else {
print "</p><strong>NB. doesn't look like opcache is present on this server.</strong></p>" . PHP_EOL;
}
?>
<h1>opcache GUIs</h1>
<ul>
<?php
foreach ($files as $filename => $details) {
print "<li><a href='$filename'>$filename</a>" . PHP_EOL;
print '<ul>' . PHP_EOL;
foreach ($details as $k => $v) {
if (strpos($v, 'http') === 0) {
$v = "<a href='$v'>$v</a>";
}
print "<li><strong>$k</strong>: $v</li>" . PHP_EOL;
}
print '</ul>' . PHP_EOL;
print '</li>' . PHP_EOL;
}
?>
</ul>
<p>Source: <a href="https://rtcamp.com/tutorials/php/zend-opcache/">https://rtcamp.com/tutorials/php/zend-opcache/</a></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment