位置: 编程技术 - 正文

PHP:unpack()的用法_misc函数(php unset())

编辑:rootadmin
unpack

推荐整理分享PHP:unpack()的用法_misc函数(php unset()),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php_uname,php uniqid(),php unpack,php_uname,php unserialize,phpunit,php unset(),php uniqid(),内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

unpack — Unpack data from binary string

说明 array unpack ( string $format , string $data )

Unpacks from a binary string into an array according to the given format.

The unpacked data is stored in an associative array. To accomplish this you have to name the different format codes and separate them by a slash /. If a repeater argument is present, then each of the array keys will have a sequence number behind the given name.

参数

format

See pack() for an explanation of the format codes.

data

The packed data.

返回值

Returns an associative array containing unpacked elements of binary string.

更新日志

版本 说明 5.5.0

Changes were made to bring this function into line with Perl:

The "a" code now retains trailing NULL bytes.

The "A" code now strips all trailing ASCII whitespace (spaces, tabs, newlines, carriage returns, and NULL bytes).

PHP:unpack()的用法_misc函数(php unset())

The "Z" code was added for NULL-padded strings, and removes trailing NULL bytes.

范例

Example #1 unpack() example

<?php$binarydata="xxxa0x";$array=unpack("cchars/nint",$binarydata);?>

The resulting array will contain the entries "chars" with value 4 and "int" with .

Example #2 unpack() example with a repeater

<?php$binarydata="xxxa0x";$array=unpack("c2chars/nint",$binarydata);?>

The resulting array will contain the entries "chars1", "chars2" and "int".

注释 Caution

Note that PHP internally stores integral values as signed. If you unpack a large unsigned long and it is of the same size as PHP internally stored values the result will be a negative number even though unsigned unpacking was specified.

Caution

Be aware that if you do not name an element, an empty string is used. If you do not name more than one element, this means that some data is overwritten as the keys are the same such as in:

Example #3 unpack() example with unnamed keys

<?php$binarydata="xxxxa0";$array=unpack("c2/n",$binarydata);var_dump($array);?>

The resulting array will contain the entries "1" with value and "2" with . The first value from the c specifier is overwritten by the first value from the n specifier.

参见

pack() - Pack data into binary string

PHP:usleep()的用法_misc函数 usleep(PHP4,PHP5)usleep以指定的微秒数延迟执行说明voidusleep(int$micro_seconds)以指定的微秒数延缓程序的执行。参数micro_seconds暂停的时间以微秒计。1微秒(micro

PHP:time_nanosleep()的用法_misc函数 time_nanosleep(PHP5)time_nanosleep延缓执行若干秒和纳秒说明mixedtime_nanosleep(int$seconds,int$nanoseconds)程序延缓执行指定数量的seconds和nanoseconds。参数seconds必须是一

PHP:time_sleep_until()的用法_misc函数 time_sleep_until(PHP5=5.1.0)time_sleep_until使脚本睡眠到指定的时间为止。说明booltime_sleep_until(float$timestamp)使脚本睡眠到指定的timestamp。参数timestamp将脚本唤醒

标签: php unset()

本文链接地址:https://www.jiuchutong.com/biancheng/280621.html 转载请保留说明!

上一篇:PHP:uniqid()的用法_misc函数(phpunicode)

下一篇:PHP:usleep()的用法_misc函数(php lee)

  • 公司替员工承担个税怎么入账
  • 收到增值税发票是不是就给钱了
  • 房地产业所得税
  • 销项税额和进项税额月底怎么结转
  • 存货盘亏计入哪个会计科目
  • 个人开票的抬头怎么写
  • 公司名称变更在哪个网站
  • 免税店含增值税吗
  • 季度不超过9万
  • 几个月以前发现便血是肠癌吗
  • 股权投资需要准备哪些材料
  • 限制性股票科目
  • 年终奖社保怎么算
  • 发放独生子女津贴的条件
  • 无分包声明
  • 餐厅开增值税普通发票
  • 电力设备维护费增值税税率
  • 免税更正申报
  • iphone无法打开网页怎么办
  • 个人从价计征房产税
  • 公司的职工教育是指什么
  • 购入办公楼按多少折算
  • bios详细解释及作用
  • 营业外支出包括哪些科目
  • 银行对公中收
  • php socket编程
  • 符合条件的小型微利企业,减按
  • 应收账款逾期的危险信号
  • 银行询证函费用减免
  • 超分辨率代码
  • 承租方的物品如何处理
  • 详解php归并排序数据
  • 发票查询密码区空白怎么回事
  • 财务会计该如何处理客户以个人账号转款到公司公账?
  • 材料采购账务处理思维图怎么做
  • 费用报销单的经办人是什么意思
  • sqlserver2012完全卸载
  • 新准则下其他应收坏账
  • 企业制造费用包括
  • 无形资产摊销完以后得账务处理
  • 对公账户收钱要手续费吗
  • 预收账款确认的条件
  • 公司涉及研发房怎么办
  • 小企业如何进行内部创新
  • 未交增值税科目怎么用
  • 流动比率与速动比率下降说明什么
  • 可转换债券的转换比率计算公式
  • 企业收到委托开具发票
  • 一般纳税人月销售额10万以下
  • 银行手续费没有发票
  • 其他业务收入的现金流量项目
  • 小规模30万含专票吗
  • sql经常用的语句
  • sql里case
  • mysq删除数据库
  • 如何重装系统win7具体步骤
  • centos禁用root
  • linux的trace
  • win8开始屏幕设置
  • msqry32.exe进程是什么文件 作用是什么 msqry32进程查询
  • win7安装软件提示停止工作
  • linux批量杀进程 awk
  • win7控制面板找不到windows update
  • Win10年度更新正式发布:功能全面升级
  • linux learn
  • cocos2dx场景切换
  • cocos2dx quick lua 学习笔记1
  • 关于service生命周期的说法正确的是
  • 守护进程和普通进程
  • jquery.treegrid
  • e87移植
  • android设计模式与最佳实践 电子版
  • 60后歌手有哪些
  • 房地产企业税种认定标准
  • 企业去哪查
  • 期间费用如何分摊到成本中
  • 浙江省税务局发票短信
  • 车船税单独交行吗
  • ca认证登录不了
  • 上海市税务局的电话
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设