Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Inlining

Inlining is the process to bring a dependency inside the current code, so as to remove that dependency.

For example, replacing a constant by its value, as a literal, means that the code works without depending on the external definition.

On the other hand, such external structure may also have its own life cycle, which is not reflected anymore. It also may hurt readability.

<?php

    const A = 1;
    
    echo A; // dependent code
    
    echo 1; // 

?>

Documentation

See Also