NOVINKA: Kurz kybernetickej bezpečnosti teraz už od 0 €. Staň sa žiadaným profesionálom. Zisti viac:
NOVINKA: Staň sa dátovým analytikom od 0 € a získaj istotu práce, lepší plat a nové kariérne možnosti. Viac informácií:

PHP - ord

Trieda

Koreň \ Bez triedy

Metóda - ord

The ord() function is used to get the extended ASCII code of the first character of a string.

Note:To get the character of a specified extended ASCII code use the chr() function.

Procedurálne

  • function ord () : void

Parametre

Žiadne

Mávratovej hodnoty

Vracia:

Returns the ASCII code of the first character of the string.

Príklady

<?php
echo 'A\'s code: ' . ord('A');
echo '<br>';
echo 'Z\'s code: ' . ord('Z');
echo '<br>';
echo 'The distance between A and Z is ' . (ord('Z') - ord('A')) . ' characters.';

Súvisiace manuály

        Aktivity