Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are the ways to define a constant in PHP?
Home
PHP
What are the ways to define a constant in PHP?
0
votes
asked
Jun 5, 2020
in
PHP
by
Robindeniel
What are the ways to define a constant in PHP?
#php-define-constant
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 5, 2020
by
SakshiSharma
PHP constants are name or identifier that can't be changed during execution of the script. PHP constants are defined in two ways:
Using define() function
Using const() function
Related questions
0
votes
Q: How is a constant defined in a PHP script?
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How can we define a variable accessible in functions of a PHP script?
asked
Jun 22, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How many ways are there to initialize an int with a Constant?
asked
Jun 9, 2020
in
C Plus Plus
by
Robindeniel
#c-initialize-constant
#c-initialize-intiger
0
votes
Q: Is It Possible To Define A Constant Value In A Record?
asked
Mar 13, 2021
in
PL/SQL
by
rajeshsharma
#constant-value
record-constant-value
0
votes
Q: What are the methods to submit form in PHP?
asked
Jun 6, 2020
in
PHP
by
SakshiSharma
#php-form-submit
#form-submit-php
+1
vote
Q: Which of the following is/are the code editors in PHP?
asked
May 13, 2022
in
PHP
by
john ganales
php-code-editors
0
votes
Q: What are include() and require() functions in PHP?
asked
Jun 6, 2020
in
PHP
by
Robindeniel
#php-include-
#php-require
#include-and-require
0
votes
Q: What are the encryption functions in PHP?
asked
Jun 6, 2020
in
PHP
by
Robindeniel
#php-encryption-functions
#encyption-functions-php
0
votes
Q: What are the different types of errors in PHP?
asked
Jun 6, 2020
in
PHP
by
Robindeniel
#php-errors-types
#error-types-php
0
votes
Q: How many types of array are there in PHP?
asked
Jun 5, 2020
in
PHP
by
Robindeniel
#php-array-types
#array-types-php
...