convert integers to hex

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • somaboy mx

    convert integers to hex

    Is there a built-in PHP function that lets you convert integers to
    hexadecimal values?
    For example 255 to FF.

    Couldn't find any in the manual.

    ..soma


  • Ewoud Dronkert

    #2
    Re: convert integers to hex

    somaboy mx wrote:[color=blue]
    > Is there a built-in PHP function that lets you convert integers to
    > hexadecimal values? [...] Couldn't find any in the manual.[/color]

    couldn't find? How is that possible?


    --
    E. Dronkert

    Comment

    • Kimmo Laine

      #3
      Re: convert integers to hex

      "somaboy mx" <nosuch@fakemai l.fk> wrote in message
      news:dogh7t$67r $1@domitilla.ai oe.org...[color=blue]
      > Is there a built-in PHP function that lets you convert integers to
      > hexadecimal values?
      > For example 255 to FF.[/color]

      Yes there is, dechex().
      [color=blue]
      > Couldn't find any in the manual.[/color]

      Have you ever seen a movie called Barry Lyndon? There's this beautiful scene
      right in the beginning, this is how the dialogue goes:

      Nora: "I have hidden my neck ribbon somewhere on my person. If you find it,
      you can have it. You are free to look anywhere for it. I will think little
      of you if you do not find it."
      Barry: "I cannot find it."
      - "You haven't looked properly."
      - "I cannot find it."
      - "I'll give you a hint."
      - "I feel the ribbon."
      - "Why are you trembling?"
      - "At the pleasure of finding the ribbon."
      - "Liar."

      Nora hid the ribbon between her breasts. Barry looked for it only from her
      hands, failing to find it. as Nora says "I'll give you a hint", she takes
      Barry's hand to here bosom, and Barry eventually finds the ribbon.

      In a way, you resemble Barry, who was so reluctant to look for the answer
      while it was practically right under his nose. Was it courtesy, shyness or
      plain stupidity? We shall never know. If you get a chance to watch Barry
      Lyndon, I recommend you to do so, it is a masterpiece by Stanley Kubrick.

      --
      "En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
      antaatulla.sika nautaa@gmail.co m.NOSPAM.invalid


      Comment

      • Erwin Moller

        #4
        Re: convert integers to hex

        Kimmo Laine wrote:
        [color=blue]
        > "somaboy mx" <nosuch@fakemai l.fk> wrote in message
        > news:dogh7t$67r $1@domitilla.ai oe.org...[color=green]
        >> Is there a built-in PHP function that lets you convert integers to
        >> hexadecimal values?
        >> For example 255 to FF.[/color]
        >
        > Yes there is, dechex().
        >[color=green]
        >> Couldn't find any in the manual.[/color]
        >
        > Have you ever seen a movie called Barry Lyndon? There's this beautiful
        > scene right in the beginning, this is how the dialogue goes:
        >
        > Nora: "I have hidden my neck ribbon somewhere on my person. If you find
        > it, you can have it. You are free to look anywhere for it. I will think
        > little of you if you do not find it."
        > Barry: "I cannot find it."
        > - "You haven't looked properly."
        > - "I cannot find it."
        > - "I'll give you a hint."
        > - "I feel the ribbon."
        > - "Why are you trembling?"
        > - "At the pleasure of finding the ribbon."
        > - "Liar."
        >
        > Nora hid the ribbon between her breasts. Barry looked for it only from her
        > hands, failing to find it. as Nora says "I'll give you a hint", she takes
        > Barry's hand to here bosom, and Barry eventually finds the ribbon.
        >
        > In a way, you resemble Barry, who was so reluctant to look for the answer
        > while it was practically right under his nose. Was it courtesy, shyness or
        > plain stupidity? We shall never know. If you get a chance to watch Barry
        > Lyndon, I recommend you to do so, it is a masterpiece by Stanley Kubrick.
        >[/color]

        LOL. :-)

        Kimmo, that is the funniest version of the famous RTFM I ever saw. :-)

        Erwin Moller

        Comment

        • Kimmo Laine

          #5
          Re: convert integers to hex

          "Erwin Moller"
          <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> kirjoitti
          viestissä:43ac0 35e$0$11065$e4f e514c@news.xs4a ll.nl...[color=blue]
          > Kimmo Laine wrote:
          >[color=green]
          >> "somaboy mx" <nosuch@fakemai l.fk> wrote in message
          >> news:dogh7t$67r $1@domitilla.ai oe.org...[color=darkred]
          >>> Is there a built-in PHP function that lets you convert integers to
          >>> hexadecimal values?
          >>> For example 255 to FF.[/color]
          >>
          >> Yes there is, dechex().
          >>[color=darkred]
          >>> Couldn't find any in the manual.[/color]
          >>
          >> Have you ever seen a movie called Barry Lyndon? There's this beautiful
          >> scene right in the beginning, this is how the dialogue goes:
          >>
          >> Nora: "I have hidden my neck ribbon somewhere on my person. If you find
          >> it, you can have it. You are free to look anywhere for it. I will think
          >> little of you if you do not find it."
          >> Barry: "I cannot find it."
          >> - "You haven't looked properly."
          >> - "I cannot find it."
          >> - "I'll give you a hint."
          >> - "I feel the ribbon."
          >> - "Why are you trembling?"
          >> - "At the pleasure of finding the ribbon."
          >> - "Liar."
          >>
          >> Nora hid the ribbon between her breasts. Barry looked for it only from
          >> her
          >> hands, failing to find it. as Nora says "I'll give you a hint", she takes
          >> Barry's hand to here bosom, and Barry eventually finds the ribbon.
          >>
          >> In a way, you resemble Barry, who was so reluctant to look for the answer
          >> while it was practically right under his nose. Was it courtesy, shyness
          >> or
          >> plain stupidity? We shall never know. If you get a chance to watch Barry
          >> Lyndon, I recommend you to do so, it is a masterpiece by Stanley Kubrick.
          >>[/color]
          >
          > LOL. :-)
          >
          > Kimmo, that is the funniest version of the famous RTFM I ever saw. :-)
          >[/color]


          RTFM is just so impersonal... :)


          --
          SETI @ Home - Donate your cpu's idle time to science.
          Further reading at <http://setiweb.ssl.ber keley.edu/>
          Kimmo Laine <antaatulla.sik anautaa@gmail.c om.NOSPAM.inval id>


          Comment

          Working...