Connect with us

WEB SOLUTIONS DONE

what is differnce between -> and => operator

programming

what is differnce between -> and => operator

 

 

 

 

 

 

 

 

what is differnce between -> and => operator

what is differnce between -> and => operator
-> is used to call a function or property or method
==> is used to call member or element of an array ; it is also called array assigned operator

$foo->test();
the code above shows that it is accessing the method or function of test() via -> operator

$foo->baz = array( ‘bar’ => ‘bazar’ );
the code above shows that is accessing the member of array ‘bar’ and ‘bazar’ via => operator

Continue Reading
You may also like...

More in programming

Advertisement




To Top