位置: 编程技术 - 正文

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)

  • 外经证预缴税款征收率
  • 年底计提是什么意思
  • 会计记账凭证如何填制
  • 收到红字专票怎么做账务处理
  • 企业投资可以税后扣除吗
  • 外购产品对外捐赠的会计处理
  • 合并会计报表长期股权投资
  • 建安税由谁承担
  • 公司买的设备
  • 弱电系统安装的注意要点
  • 三证合一后还要去税务局吗
  • 小规模银行存款多笔小金额财务费用可以合并记账吗?
  • 个独企业如何拿钱
  • 代理运输协议范本
  • 冲减材料成本
  • 工程会计的主要工作
  • 花语大全各种花的花语花树
  • mac只能读不能写
  • php glob
  • Win10 20H1/20H2 KB5001391补丁今日发布(内附下载)
  • 周转材料要计入增值税吗
  • 以公允价值计量是什么意思
  • 完美解决索尼电视arc无声音
  • 木卫一距离木星多远
  • php删除数组中重复的元素
  • 企业增加实收资本流程
  • yii框架教程
  • php与ajax交互
  • 研发费用怎样进项抵扣
  • thinkphp-5.0
  • 设置背景图片大小和元素的大小一致的代码
  • 长期股权投资的账务处理
  • 业务出差餐费如何记账
  • 贴现手续费计入哪个明细科目
  • php安装步骤
  • 织梦如何添加浮动广告
  • 生产费用在完工产品和在产品之间的方法
  • 预付款项为什么这么多
  • 经营范围广告业务能开什么发票
  • Mysql 创建索引锁表
  • 生产成本怎么结账
  • 个人所得税应纳税额
  • MySQL中使用命令行查看二进制文件
  • 企业自查发现以什么为主
  • 企业债务重组业务
  • 新契税法商业
  • 企业购买房产怎么记账
  • 暂估入库成本处理
  • 没有外币账户可以收外币吗
  • 工程检测公司的账务处理流程
  • win10安装完成后需要做哪些设置
  • ubuntu安装超详细教程
  • linux 软件 安装
  • 一键ghost还原备份
  • win10系统锁屏后不弹出解锁界面
  • 华硕a400u安装win7
  • windows7桌面右击
  • 电脑安装win8系统
  • win7 u盘启动按哪个键
  • cocos2dx4.0教程
  • 实例讲解命局与大运流年作用
  • dos打开usb端口
  • lessons there是什么意思
  • unity4.5.3f3 和 Android的通信
  • 批处理设置dns
  • [置顶]马粥街残酷史
  • js中的常用方法
  • 怎么配置nodejs的环境
  • shell脚本中实现rm -fr !(file1)
  • javascript查询
  • 冒烟测试和接口测试
  • 每天一篇小练笔主题
  • 简单谈谈你对中国国防建设的认识
  • 市直单位正职是市单位一把手吗
  • 代扣代缴申报表哪里查询
  • 广东省国家税务总局班子成员
  • 划拨土地评估价
  • 园区地税局在哪里
  • 国税局发票打印软件下载
  • 税收是初次分配的手段
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设