What scenarios should these two => and -> be used in?
=> is a key-value pair
-> is similar to (.) in java. It means the equivalent of calling. For example, $a->$b(); means calling the b() function of an object. ;
=> is used to connect the key-value pairs in the array, -> is used to call methods or variables
=> is a key-value pair
-> is similar to (.) in java. It means the equivalent of calling. For example, $a->$b(); means calling the b() function of an object. ;
=> is used to connect the key-value pairs in the array, -> is used to call methods or variables