note 117317 deleted from function.empty by cmb
| From: | cmb@php.net | Date: | Wed, 20 May 2015 16:30:02 +0000 |
| Subject: | note 117317 deleted from function.empty by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202625@lists.php.net to get a copy of this message | ||
Note Submitter: me at ruslanbes dot com
----
Note that before PHP 5.5 using empty() with constants will produce cryptic T_PAAMAYIM_NEKUDOTAYIM
error. The sample code:
<?php
define("GLASS", "half-full");
if (empty(GLASS)) {
echo "The glass is empty";
}
// Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in ... on
line 3
?>