位置: 编程技术 - 正文

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)

  • 辞退员工补偿金是按实发工资算还是应发
  • 小规模印花税是季报还是月报
  • 出口货物不能退税的原因
  • 其他业务成本影响营业成本吗
  • 事业单位法人证书查询
  • 预提费用所得税前扣除
  • 已经计提折旧的固定资产购入后 加快折扣年限
  • 运费客户承担钱销售员垫付冲应收怎么处理?
  • 拆迁置换安置房
  • 银行收到对方付款的会计分录
  • 销售货物收入与营业收入
  • 仓储租赁增值税
  • 运费发票备注栏新规定
  • 建筑企业能申请小微企业吗
  • 财务费用是否存入银行卡
  • 2021年电子税务局印花税怎么申报
  • 股东分红纳入社会保险吗
  • 直接计入所有者权益的利得是
  • 外币折算差额计入什么科目
  • 电子产品怎么计税
  • 普通增值税发票跨越可以作废吗
  • 房屋维修基金怎么申请使用
  • win10桌面窗口管理器gpu占用高
  • php哪个函数能取得字符串长度
  • 对于接受捐赠的固定资产
  • 未缴纳社保可以直接走人吗
  • 一只正在树上吃的苹果
  • 结算借款的账务处理办法
  • ant design pro项目构建纯净版
  • 垃圾分类手工小模型
  • el-upload上传文件携带参数
  • php中常量
  • xa 事务
  • 融资手续费计入长期待摊
  • 零申报企业所得税怎么申报
  • 关于DEDECMS移动data后网站地图无法生成的解决方法
  • 其他应收款可以直接平账吗
  • 所得税费用期末结转吗
  • 金蝶可以自动结账吗
  • 个体工商户税收标准2023年
  • 普票是啥意思
  • 接待客人后的感受和过程
  • 申报工资金额
  • 服务业的收入确认原则
  • 一般纳税人只开普票不开专票免税
  • 未开发票已收款如何做账?
  • 库存商品怎么做表格
  • 公司报销发票需要查验真假吗
  • 应收未收的款项如何会计处理
  • 收到去年所得税退税款会计分录
  • 税率计税依据
  • 小规模转一般纳税人进项票如何处理
  • 成本发票怎么入账
  • 负债表预付账款怎么填
  • 事业单位对公账户和零余额账户一样么
  • 资产减值损失是借增贷减吗
  • mysql5.6下载
  • mysql 复合查询
  • mysql join查询慢
  • fedora改密码
  • win10预览版21390
  • 笔记本xp系统怎么升级win7系统
  • centos文件备份
  • win10桌面添加画图图标
  • mac怎么连接打印机设备
  • SFC无需光盘出马,硬盘搞定
  • neoCapture.exe - neoCapture是什么进程 有什么用
  • javascript获取数据类型
  • javascript中对象一般由什么组成
  • node stream原理
  • 创建nodejs项目的步骤
  • python获取命令行执行命令的输出
  • node.js中用什么方法处理get、post请求的参数
  • 地盘正针的详解使用
  • shell脚本实例精讲
  • JavaScript window.setTimeout() 的详细用法
  • javascript教程
  • 湖南增值税普通发票查询系统官网
  • 长春税务局待遇如何
  • 珠海南湾国际属于香洲哪个街道
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设