Tool to find unuse code by OpCache's bytecode optimizer

0.1.0 2019-02-09 19:31 UTC

This package is auto-updated.

Last update: 2025-07-10 12:12:29 UTC


README

phpfu detects code that did not pass from opcache

Installation

composer require --dev nakamura244/phpfu

Usage

<?php

echo a();

function a()
{
    try {
        $a = 42;
        return $a;
    } finally {
        return 42;
    }
}
$ php fu example.php                 
phpfu 0.1.0 by nakamura244.

Unuse code?: 

method: a: [path]/example.php:5-13
bytecode: 
BB3: unreachable lines=[4-4]
BB4: unreachable lines=[5-5]
BB7: unreachable lines=[9-9]

Caution