Reading I read “Algorithms and structures of data” by N. Wirth. There has gotten an info that small data can be packaged in one word. As I understand it allows you to use memory more efficiently. Perhaps this applies only to low-level languages.

So the question arose: what advantages does the pack () function provide and what interesting things can be done with the binary string obtained at the output? Since the question is clearly a school level, better give a link to an article in the topic.

UPD: re-read and realized that some nonsense asked. Because tick +

    1 answer 1

    Are you not able to type two words in Google?

    One of the first: pack

    Packs the specified arguments into a binary string according to the format in the format parameter.

    • In my opinion, the question was closed early. Since I'm not interested in what the function itself does, but in what can be done with the binary string received from it. - zenith
    • Google "php pack examples" gives Results: approximately 10,400,000 (0.18 seconds). Read. - avp