Answers for "php check if constant exists"

PHP
1

php has constant

defined(string $name);
Posted by: Guest on October-02-2021
0

check if constant is defined php

// you can check their existence by using the defined() function
if (defined('VAR_NAME')) {
    // Something
}
Posted by: Guest on February-11-2022

Browse Popular Code Answers by Language