Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php ??

// Example usage for: Null Coalesce Operator
$action = $_POST['action'] ?? 'default';

// The above is identical to this if/else statement
if (isset($_POST['action'])) {
    $action = $_POST['action'];
} else {
    $action = 'default';
}
Source by workingkeys.org #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
3+5 =