PHP Operators Class 10 (Type: instanceof, Conditional Assignment: Ternary, Null coalescing Operator)



PHP Operators

Type Operators

The instanceof operator is used in PHP to find out if an object is an instantiated instance of a class.
Syntax:
$a instanceof MyClass
Operands: This operator contains two operands which are listed below:
$a: This is used as an object.
MyClass: It is a class name.
Return Value: It returns True if the object is of this class or has this class as one of its parents else it will return a False value.

The instanceof operator was introduced in PHP 5. Before this time is_a() was used but is_a() has since been deprecated in favor of instanceof. Note that as of PHP 5.3.0, is_a() is no longer deprecated.

Conditional Assignment Operators

Ternary
Returns the value of $x.
The value of $x is expr2 if expr1 = TRUE.
The value of $x is expr3 if expr1 = FALSE

Null coalescing
Returns the value of $x.
The value of $x is expr1 if expr1 exists, and is not NULL.
If expr1 does not exist, or is NULL, the value of $x is expr2.
Introduced in PHP 7

Download Notes Link:

…………………………………………………………………..
The people of bikaner is also know about quality of Axixa technologies and Rajesh sir. Axixa is old and popular place for programming languages since 10 years.. we’ll try to cover all basic and advanced topic of php in our php tutorials.

learn php with AXIXA technologies and have a nice day

If you want me to cover any topic related it sector you can comment down the topic we will try to cover that.

Rajesh purohit (+919251435299)
Email: rmcats@gmail.com
Website:
Facebook:
instagram :

#instanceof #Conditional #Assignment #Ternary #Nullcoalescing #Operator #PHP # tutoria
#Execution #Operators #Incrementing #/Decrementing #Operators #Logical #Operators #Bitwise #Operators #Array #Operators
#Type #Operators #Define #function #Const #keyword #Magic #constants #Scalar #Compound #Special #datatype #integer #AXIXA #Heredoc #nowdoc #Scope #syntax #php #web_development #free_classes #covid_19_special #stay_tuned #keep_watching #keep_supporting #subscribe_now #press_bell_icon #like #share #web_design #website_design #trading keywords

Nguồn: https://svdpch.org/

Xem thêm bài viết khác: https://svdpch.org/cong-nghe/

1 thought on “PHP Operators Class 10 (Type: instanceof, Conditional Assignment: Ternary, Null coalescing Operator)”

Leave a Comment