Created
August 6, 2016 15:25
-
-
Save Restoration/608e1e694a4bcc66cd3ba6fda29078d6 to your computer and use it in GitHub Desktop.
定義済みの関数があるかを調べる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define('TEST','PHP逆引きレシピ'); | |
| //定義済みの関数があるかを調べる | |
| print_r(get_defined_constants(true)); | |
| //定義済みかどうかを調べる | |
| if(defined('TEST')){ | |
| echo "定数TESTは定義されています。"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment