php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "defined constants"

Can constants with PHP namespaces be defined using define()?

Constants with PHP namespaces cannot be defined using the define() function. Instead, you can define constants within a namespace using the const keyw...

Can defined constants be deleted in PHP?

Defined constants cannot be deleted in PHP once they have been defined using the define() function. However, if you want to "unset" a constant, you ca...

Are constants defined with const always global in PHP?

Constants defined with `const` in PHP are always global within the scope they are defined in. To make a constant local to a specific scope, you can de...

How can constants be defined in a class in PHP?

To define constants in a class in PHP, you can use the `const` keyword followed by the constant name and its value. Constants in a class are defined u...

In PHP, what are the differences between using defined constants and magic constants like __FILE__ when working with file and folder paths?

When working with file and folder paths in PHP, using defined constants for paths provides more flexibility and readability compared to using magic co...

Showing 1 to 5 of 2872 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 574 575 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.