This function will format a MAC address into XX:XX:XX:XX:XX:XX format from whatever format is passed to the function. The delimiter (':' in the example above) will be replaced with whatever chaîne de caractères is passed to the $delimiter parameter (default ':').
chaîne de caractères $input - The chaîne de caractères containing the MAC Address
chaîne de caractères $delimiter - The chaîne de caractères representing the delimiter to use when formatting the MAC Address
chaîne de caractères $uppercase - If set to TRUE (default), the alpha characters in the hexadecimal values in the MAC Address will be returned in uppercase. If FALSE, the alpha characters in the hexadecimal values will be returned in lowercase.
chaîne de caractères - The formatted MAC Address or FALSE if the syntax of the MAC address is invalid
Exemple 49-1. Using format()
This would output the following:
|
Exemple 49-2. Using format() to get a MAC address with a different delimiter
This would output the following:
|
Exemple 49-3. Using format() to get a MAC address with all capital alpha characters
This would output the following:
|
Précédent | Sommaire | Suivant |
Net_MAC::check() | Niveau supérieur | Net_MAC::__construct() |