Methods:
It sets the behavior of the class object.
Method calls: In Swift, Classes, Structures and
Enumeration instances can be accessed through the
instance methods. Instance methods can be accessed by
using the '.' dot syntax. Whereas in Rust method call can
be done by using the impl keyword.
In php: a) The GET Method b) The POST Method
These methods are used to send information from
browser client to web browser
a) The GET Method
It is used to send the encoded user information to the
page request. The page and the encoded information
are separated by the ? character.
The GET method produces a long string that appears
in the server logs.
The GET method is restricted to send upto 1024
characters.
It is not applicable to use GET method if you have
password or other sensitive information to be sent
to the server.
Images(Binary) or Documents cant be sent using
GET method
$_GET associative array is used to access all the sent
information using GET method
b) The POST Method
It transfers information using HTTP headers. The
information is encoded like that of GET method and put
into a header called QUERY_STRING.
It doesnt have any size restrictions.
ASCII as well as binary data can be sent.
As the data goes through HTTP header. By using
Secure HTTP you can make sure that your
information is secure.
$_POST associative array is used to access all the
sent information using POST method.
Self property in Methods: In Swift, Methods have an
implicit property known as 'self', This 'Self' property
is used to refer the current instances for when it is
called in a method. In Rust, self is used if its a value
on the stack, &self is used if its a reference, and
&mut self if its a mutable reference.