update page now
Longhorn PHP 2026 - Call For Papers

Voting

: max(six, six)?
(Example: nine)

The Note You're Voting On

Anonymous
8 years ago
Be careful with boolean defines and assuming a check is done for a specific value by defined such as
<?php

define('DEBUG', false);

if(defined('DEBUG')){
    echo 'Not really debugging mode';
}
?>

You want to also check the constant as in

<?php
define('DEBUG', true);

if(defined('DEBUG') && DEBUG){
    echo 'Really this is debugging mode';
}
?>

All defined is doing is verifying the constant exists not it's value.

<< Back to user notes page

To Top