title: PHP SSL Certificate Serial Number in hexadecimal
body: <p>I need to display SSL certificat information about Serial Number.
  When I use</p>
  
  <pre><code>$cert = file_get_contents('mycert.crt');
  $data=openssl_x509_parse($cert,true);
  $data['serialNumber']
  </code></pre>
  
  <p>I receive like
      -5573199485241205751
  But when I run command
      openssl x509 -in 'mycert.crt' -noout -serial
  I receive
      serial=B2A80498A3CEDC09
  is it possible receive in PHP?
  Thanks.</p>