Revision 8361
Added by Aaron Marcuse-Kubitza over 11 years ago
util.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
function coalesce($value, $empty) { return isset($value) ? $value : $empty; } |
|
3 |
|
|
2 | 4 |
function starts_with($str, $prefix) |
3 | 5 |
{ |
4 | 6 |
return substr($str, 0, strlen($prefix)) === $prefix; |
Also available in: Unified diff
web/main/util.php: Added coalesce()