我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

将大整数转换为二进制Little-Endian php

I want convert 365 decimal to binary (each number four bytes) So i convert:

pack("s*",1); // output .... , in hexedidor: 01000000

And this is the correct output But when conver 365 :

pack("s*",365); // output m... in hexeditr:6D000100

But I expect 6D010000 How can I get that conclusion? example output I need 1

my code :

$content= pack("s*",365);
file_put_contents("file.txt",iconv("UTF-8","UTF-16LE",$content));

近期文章

  • laravelcollective:为每个选项添加额外的属性(Form :: Select)
  • Froala / PHP - 图片上传失败(出错了......)
  • too long
  • PHP变量声明中的双括号?
  • Php id在js中识别
  • 如何在laravel中格式化分页?
  • CakePHP 2.x - 请求数据中的某些字段不完整
  • 无法使用wordpress上传otf文件
  • 当我显示myprojectdomain / home侧边栏但是当我在模块myprojectdomain / systemusers时,侧边栏不是
  • 根据时区以24或12小时格式显示时间
  • 如何在另一个文件的变量中向数组添加数据?
  • PHP中的aws-sdk加密kmsClient错误
  • sqlsrv PHP返回必须声明标量变量“@ P1”
  • 条带webhook在TEST模式下正确响应,但在LIVE中没有响应
  • 在Php / Apache / Ubuntu上运行长进程
  • Laravel:Jasper在laravel lumen5.6中报道
  • Summernote编辑器 - 上传后无法查看图像
  • 当pass命令作为变量时,proc_open不起作用
  • 表单内部与POST数组交互
  • 防止Behat处理客户端代码中的异常

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华