Elgg  Version 3.0
opcache.php
Go to the documentation of this file.
1 <?php
6 $opcache_available = function_exists('opcache_get_status');
8 
10  $opcache_status = opcache_get_status(false);
11 }
12 
13 if (!$opcache_available || empty($opcache_status)) {
14  echo '<p>' . elgg_echo('admin:server:opcache:inactive') . '</p>';
15  return;
16 }
17 
18 $array_to_table = function($array) use (&$array_to_table) {
19  $rows = '';
20  foreach ($array as $key => $value) {
21  if (is_array($value)) {
22  $rows .= "<tr><th colspan='2'><b>{$key}</b></th></tr>";
23 
25  continue;
26  }
27 
28  if ($value === true) {
29  $value = 'true';
30  } elseif ($value === false) {
31  $value = 'false';
32  }
33 
34  $rows .= "<tr><td>{$key}</td><td>{$value}</td></tr>";
35  }
36 
37  return $rows;
38 };
39 
40 echo elgg_format_element('table', ['class' => 'elgg-table'], $array_to_table($opcache_status));
if($opcache_available) if(!$opcache_available||empty($opcache_status)) $array_to_table
Definition: opcache.php:18
$rows
Definition: redis.php:20
$opcache_status
Definition: opcache.php:7
$opcache_available
OPCache info.
Definition: opcache.php:6
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168
elgg echo
Translates a string.
Definition: languages.js:43
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif(is_callable([$item, 'getType']))
Definition: item.php:39
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
Definition: summary.php:55
$value
Definition: debugging.php:7