Difference between -> and => in PHP
Arrow Operator ->
The arrow operator ( -> ) is used to call method and access property of an object
$obj = new StdClass;
$obj->foo = 'bar';
Double Arrow =>
The double arrow operator is used to set key value pairs in an array
$array = array(
'foo' => 'bar'
);
var_dump($array);
0 Comments