You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

PHP中ord()函数的英文全称是什么?它是哪个单词的缩写?

PHP's ord() and chr(): Their Full Name Origins

Nice question—this is one of those small details that's easy to wonder about once you start using these functions regularly! Here's the clear breakdown:

  • ord() is an abbreviation for ordinal. This fits perfectly because the function returns the ordinal (ASCII) numerical value of a single character. Think of "ordinal" as referring to a character's position in the ASCII sequence—for example, ord('A') returns 65, which is the ordinal position of 'A' in the ASCII table.

  • chr() is exactly what you suspected: it's short for character. As the reverse of ord(), it takes an ASCII ordinal value and spits back the corresponding character—like how chr(65) gives you 'A'.

内容的提问来源于stack exchange,提问作者alex

火山引擎 最新活动