36

GitHub - sebastianbergmann/foal: Tool to find lines eliminated by OpCache&#3...

 5 years ago
source link: https://github.com/sebastianbergmann/foal
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Find Optimized-Away Lines (FOAL)

foal finds lines of code that are eliminated by OpCache's bytecode optimizer.

Installation

PHP Archive (PHAR)

The easiest way to obtain foalis to download a PHP Archive (PHAR) that has all required dependencies bundled in a single file:

$ wget https://phar.phpunit.de/foal.phar

Composer

You can add this tool as a local, per-project, development-time dependency to your project using Composer:

$ composer require --dev sebastian/foal

You can then invoke it using the ./vendor/bin/foal executable.

Usage

example.php

<?php
function f()
{
    $result = 'result';

    return $result;
}
$ php foal.phar example.php
foal 1.0.0 by Sebastian Bergmann.

The OpCache optimizer eliminated the following sourcecode lines:

4          $result = 'result';
7      }

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK