1. Home
  2. Computer Science MCQs
  3. PHP
  4. How do you create a constant in PHP?

Added 20 Jan 2024

How do you create a constant in PHP?

  1. const()
  2. constant()
  3. define() Correct answer
  4. def()

Correct answer

C. define()

14 views

MCQSEXAM

Explanation

The define() function is used to create constants in PHP.

Reference

Asked in: PHP Certification

https://www.php.net/manual/en/function.define.php

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs