Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

PHP OOP - Class Constants

<?php
class Goodbye {
  const LEAVING_MESSAGE = "Thank you for visiting W3Schools.com!";
}

echo Goodbye::LEAVING_MESSAGE;
?>
 
PREVIOUS NEXT
Tagged: #PHP #OOP #Class #Constants
ADD COMMENT
Topic
Name
6+3 =