hexdec() function in PHP


The hexdec() function converts hexadecimal number to decimal number.

Syntax

hexdec(val)

Parameters

  • val − The hexadecimal to be converted.

Return

The hexdec() function Returns the decimal value of val, which is hexadecimal.

Example

 Live Demo

<?php
   echo hexdec("d") . "<br>";
   echo hexdec("398f");
?>

Output

13<br>14735

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 26-Jun-2020

71 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements