位置: 编程技术 - 正文

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)

  • 工程附加税怎么计算
  • 网络贷款需要缴纳保证金吗
  • 折扣折让红字发票怎么做账务处理
  • 购入股票作为短期投资是什么凭证
  • 项目固定资产投资强度
  • 财务报表可以补充分类吗
  • 个税属于会计中的什么科目
  • 土地使用税怎么终止
  • 基金投资债券会赔吗
  • 跨境电商有进口吗
  • 应收账款融资的优缺点
  • 主营业务收入如何红冲
  • 产品试用装入什么科目里
  • 收到增值税专用发票怎么处理
  • 发票冲红后原发票还有用吗?
  • 股票回购后多久注销
  • 代开专票怎么做账?
  • 移动网络的费用有哪些
  • 个人取得的股票转让所得暂不征收个人所得税
  • 小规模纳税人0税率
  • 补记以前年度收入分录
  • 购买方已认证的专票怎么红冲
  • 贴现利息由谁承担
  • 分配水电费包括税费吗
  • 汇算清缴申报表怎么填
  • php处理图片需要什么扩展
  • ajax调用php函数
  • linux1970
  • 成本核算方法主要有哪些
  • 巴伐利亚州地图
  • 以前年度未入账固定资产账务处理
  • 生产企业放假前的安全提示
  • 桥梁水泥和普通水泥有什么区别
  • php16进制
  • 小规模纳税人要交企业所得税吗?
  • 城建税教育费附加什么时候交
  • 简易html代码
  • cookie与session的作用和原理
  • php强制下载文件在哪
  • 研发支出资本化支出属于什么科目
  • 增值税系统技术维护费抵扣只能当月申报
  • 租赁汽车折旧年限怎么算
  • 手机话费怎么打发票
  • javascript 模块
  • 受托代销商品的手续费计入什么科目
  • 物业公司收取的电费怎么确认收入
  • 票据承兑和贴现是指
  • 数据库维护工作主要包括哪些内容
  • sql server2005备份
  • 公司贷款可以转私户吗
  • 库存现金账实不符怎么处理
  • 单位订购价格
  • 小规模开票的税点是多少
  • 税种的分类方法有哪些
  • 收到第三方补助怎么做账
  • 代发工资业务流程
  • 2023年职工社保缴费标准一览表
  • 年数总和法净残值怎么算
  • sql server查询数据库大小
  • Windows自带的游戏怎么删除
  • 搜狗网络
  • 如何用u盘装系统盘
  • Ubuntu 12.04安装Xen常见问题及解决方法汇总
  • win8系统如何卸载软件
  • win7开机每次都要输入用户名
  • nodevideo翻译
  • opengl gltranslatef
  • easyui multiple
  • win7系统设置wifi热点
  • JavaScript电子时钟倒计时第二款
  • Python的SQLalchemy模块连接与操作MySQL的基础示例
  • 江苏省增值税专用发票怎么开
  • 国家税务总局张局长
  • 发票打印机设备设置
  • 河北电子税务局电话
  • 税务局报备资产怎么填
  • 随子女定居外省好吗
  • 江苏电子税务局官网登录入口
  • 税务变更表
  • 机动驳船是什么
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设