The code is as follows:/* * substr returns the substring of the string * base_convert converts numbers between any bases * fileperms obtains the permissions of the file */// obtains the permissions function getChmod($filepath){ return substr(base_convert( @fileperms($filepath),10,8),-4);} http://www.bkjia.com/PHPjc/328051.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/328051.htmlTechArticle copy code The code is as follows: /* * substr returns the substring of the string * base_convert Convert numbers between arbitrary bases * filepe1.
1. 10 recommended articles about the php fileperms() function
Introduction: The code is as follows:/* * substr returns the substring of the string * base_convert converts numbers between arbitrary bases * fileperms obtains file permissions *// / Get permission function getChmod($filepath){ return substr(base_convert(@fileperms($filepath),10,8),-4);} http://www.bkjia.com/PHPjc/328051.htmlwww.bkjia. comtruehttp://www.bkjia
2. php base conversion function
Introduction: PHP decimal conversion functions are as follows: bindec() — Convert binary to decimal decbin() — Convert decimal to binary dechex() — Convert decimal to hexadecimal decoct() — Decimal Convert to octal hexdec() — Convert hexadecimal to decimal octdec() — Convert octal to decimal base_convert() – The application of converting numbers between any bases is explained as follows: 1. Decimal system (decimal system) conversion function...
3. Can sprintf convert hexadecimal to decimal?
Introduction: echo sprintf("%x","10");a has completed the conversion from decimal to hexadecimal; Can sprintf convert hexadecimal to hexadecimal? 10 hex? Don't want to use base_convert function. echo base_convert('a',16,10);10
Introduction: php, function: A large summary of PHP mathematical operation functions. Classics worth collecting: This article summarizes and analyzes PHP mathematical operation functions. Share it with everyone for your reference, the details are as follows: 1. Description of commonly used functions: Abs: Get the absolute value. Acos: Get the arc cosine value. Asin: Get the arcsine value. Atan: Get the arctangent value. Atan2: Calculates the arctangent of a two number. base_convert: Convert the carry method of the number. BinDec: Convert binary to decimal. Ceil: Calculates the smallest integer greater than the specified number. Cos: cosine calculation. DecBin: Convert decimal to binary. DecHe
5. Introduction to PHP Get File Permissions Function_PHP Tutorial
Introduction: PHP Get File Permissions Function Introduction . Copy the code as follows: /* * substr returns the substring of the string * base_convert converts numbers between arbitrary bases * fileperms obtains the permissions of the file */ // obtains the permissions function getCh
6. php base_convert() base number conversion function_PHP tutorial
Introduction: php base_convert() base number conversion function. The base_convert() function converts numbers between arbitrary bases. Syntax base_convert(number,frombase,tobase) Parameter Description number Required. Original value. frombase required. The original base of numbers
7. Example of base_convert() base number conversion function in php, base_convert base_PHP tutorial
Introduction: Example of base_convert() base number conversion function in php, base_convert base. Example of base_convert() base number conversion function in PHP, base_convert base This article describes the implementation method of base_convert() function base number conversion in PHP. Share it with everyone for your reference
Introduction: PHP implements arbitrary base conversion class sharing, PHP implements base sharing. Sharing of arbitrary base conversion classes implemented by PHP, PHP implementation of base sharing. I didn’t know that PHP comes with base_convert that can realize conversion between arbitrary bases, so I wrote one myself. . . . php
9. php function accumulation summary
Introduction: Math function: 10 commonly used ones marked in red. abs — Absolute acos — Inverse cosine acosh — Inverse hyperbolic cosine asin — Arc sine asinh — Inverse hyperbolic sine atan2 — Arc tangent of two parameters atan — Arc tangent atanh — Inverse hyperbolic tangent base_convert — Convert between arbitrary bases Digital bindec - Binary to decimal conversion
10. php base_convert() base number conversion function
Introduction: php base_convert() base number conversion function. The base_convert() function converts numbers between arbitrary bases. Syntax base_convert(number,frombase,tobase) Parameter Description number Required. Original value. frombase required. The original base of the number
[Related Q&A recommendations]:
php - Can sprintf convert hexadecimal to decimal?
php bug in calculating network address
The above is the detailed content of 10 recommended articles about the php base_convert() function. For more information, please follow other related articles on the PHP Chinese website!