Declaring CONSTANT in PHP

Instead of checking and declaring constant in this way
<?php
if ( ! defined('FOOBAR') ) define('FOOBAR', '123');

We can rewrite it as
<?php
defined('FOOBAR') or define('FOOOBAR', '123');

No comments:

Post a Comment