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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:11:31