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

Conditional Structures

Conditional structures are instructions which run different code, based on a condition.

This includes if-elseif-then, switch(), match(), the ternary operators ? ... : and ?: and the coalesce operator ??.

<?php

    if (!function_exists('trumpet')) {
        function trumpet() {
            // doSomething
        }
    }

?>

Documentation

See Also