php constant variable in hindi/urdu||learn about constant in php||yahoo||baba||php constant||magic

Опубликовано: 12 Июнь 2026
на канале: Khatore Classes
201
8

#PGTCOMPUTER #phpconstant #constant

#navodaya2020

#computerteacher

#kvscomputerteacher

#rajsthanpatwari

#rajsthanconstable

#bank_PO
#ssc_exam
#ibps

#राजस्थानपटवारीपरीक्षा

#राजस्थानकॉन्स्टेबलभर्तीपरीक्षा

#computerteachervacancy2020
What is email

WHAT IS protocol

How to USE email protocol

#computer

#information technology

#RKCL

#CBSE

#RBSE

#phptutorial #website # beginners #php #hindi # hanumankhatore #phpproject #phpfullcourse

Hanuman khator channel को subscribe करना ना भूले।

इतने प्रकार के telnet protocol नही देखे होंगे|| types of telnet protocol in hindi||

WHATSAPP NO 9828128420 FOR FREE COUNSELING IN sriganganagar

Computer classes| most 5 questions|| BCA||BTech||MSc||MCA

New update 2020

PGT COMPUTER TEACHER

Telnet protocol in hindi||Telnet protocol in computer network ||what is telnet ||easily explained

Operating system is linux

Computer teacher vacancy in rajasthan 2020

Rajasthan patwari bharti 2020

What is computer

How to subscribe

1. Youtube को open करो।


2. Hanuman khator टाइप करो।


3.subscribe का बटन दबाए।
PHP Constant
Define constant- A constant is a variable whose value cannot be changed at runtime.
Suppose we are developing a program that uses the value of PI 3.14, we can use a constant to store its value.
Let’s now look at an example that defines a constant. define('PI',3.14); //creates a constant with a value of 3.14 Once you define PI as 3.14 , writing a code like below will generate an error PI = 4; //PI has been defined as a constant therefore assigning a value is not permissible.
constant() example
?php
define("MINSIZE", 50);

echo MINSIZE;
echo constant("MINSIZE"); // same thing as the previous line
?
Only scalar data (boolean, integer, float and string) can be contained in constants.
Differences between constants and variables are
• There is no need to write a dollar sign ($) before a constant, where as in Variable one has to write a dollar sign.
• Constants cannot be defined by simple assignment, they may only be defined using the define() function.
• Constants may be defined and accessed anywhere without regard to variable scoping rules.
• Once the Constants have been set, may not be redefined or undefined.
Valid and invalid constant names
// Valid constant names
define("ONE", "first thing");
define("TWO2", "second thing");
define("THREE_3", "third thing");
define("__THREE__", "third value");

// Invalid constant names
define("2TWO", "second thing");

PHP Magic constants
PHP provides a large number of predefined constants to any script which it runs.
There are five magical constants that change depending on where they are used. For example, the value of _LINE_ depends on the line that it's used on in your script. These special constants are case-insensitive and are as follows −
A few "magical" PHP constants are given below −
Sr.No Name & Description
1 _LINE_
The current line number of the file.
2 _FILE_
The full path and filename of the file. If used inside an include,the name of the included file is returned. Since PHP 4.0.2, _FILE_ always contains an absolute path whereas in older versions it contained relative path under some circumstances.
3 _FUNCTION_
The function name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the function name as it was declared (case-sensitive). In PHP 4 its value is always lowercased.
4 _CLASS_
The class name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the class name as it was declared (case-sensitive). In PHP 4 its value is always lowercased.
5 _METHOD_
The class method name. (Added in PHP 5.0.0) The method name is returned as it was declared (case-sensitive).

What is Operator? Simple answer can be given using expression 4 + 5 is equal to 9. Here 4 and 5 are called operands and + is called operator. PHP language supports following type of operators.
• Arithmetic Operators
• Comparison Operators
• Logical (or Relational) Operators
• Assignment Operators
• Conditional (or ternary) Operators