php-transpiler icon indicating copy to clipboard operation
php-transpiler copied to clipboard

Inlining Include and Require does not act on files that do not declare anything

Open original-brownbear opened this issue 9 years ago • 0 comments

Example:

for($i=0; $i < 1000000; $i++){
    include 'child.php';
}

child.php

<?php
'a' . 'b';

=> child.php should be inlined! So long as it does not contain any declarations or includes files that do this is a safe optimization imo.

original-brownbear avatar Jan 03 '16 18:01 original-brownbear