Measure OPcache memory utilization from the command line

$status = opcache_get_status(false);
$mem = $status['memory_usage'];

printf(
    "Used: %.2f MB | Free: %.2f MB | Wasted: %.2f MB (%.1f%%)
",
    $mem['used_memory'] / 1024 / 1024,
    $mem['free_memory'] / 1024 / 1024,
    $mem['wasted_memory'] / 1024 / 1024,
    $mem['current_wasted_percentage']
);