Idempotent

Idempotent is said of an operation, which yields always the same result after the first call. In other words, repeating the operation does not produce a different result beyond the initial application.

This is the case of strtolower() and strtoupper(): once the string has been made lower case, resp. upper case, calling the same function again on the string will not change the result.

In distributed systems and HTTP APIs, idempotency is enforced through an idempotency key: a unique identifier (typically a UUID) supplied by the client with each request. The server stores the outcome of the first request under that key and returns the cached result for any subsequent request carrying the same key, preventing duplicate side-effects such as double payments or duplicate record creation.

<?php

    $string = aBC;

    $string1 = strtolower($string); // abc
    $string2 = strtolower($string2); // abc
    $string3 = strtolower($string3); // abc
    $string4 = strtolower($string4); // abc
    // ...

?>

Documentation

See also Idempotence, Designing Idempotent PHP APIs for Distributed Systems and Idempotency: What, Why and How.

Related : strtolower(), Determinism, Useless, Deduplication, Universally Unique IDentifier (UUID), Unique Identifier, Fingerprint, HTTP Method, Replay, Retry, Time To Live (TTL), Webhook