Discussion :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
class myObject { }
define('myObject::CONSTANT', 'test');
echo myObject::CONSTANT;
?>
Answer : Option B
Explanation :
Class constants cannot be defined outside class.
Be The First To Comment