Conditional Structures

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

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

<?php

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

?>

Related : Switch, Match, If Then Else, Coalesce Operator, Ternary Operator