title: PHP - ECDSA - Public key (json) to Pem Format
body: <p>I'm stuck from yesterday, I can't find any way to do what I need...
  I have a public key (json) that we get from an API and I need to convert it in Pem format because I need to verify the signature (with lcobucci library)
  I'm using PHP 5.5.9 (for my work)</p>
  
  <p>I have something like this :</p>
  
  <pre><code>"kty": "EC",
  "kid": "xxxxxxxxxxxx"
  "use": "sig"
  "crv": "P-384",
  "x": "xxxxxxxxxxxxxxxxx",
  "y": "xxxxxxxxxxxxxxxxx"
  }
  </code></pre>
  
  <p>And I would like to have this :</p>
  
  <pre><code>-----BEGIN PUBLIC KEY-----
  MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZe2loSV3wrroKUN/4zhwGhCqo3Xh
  u1td4QjeQ5wIVR0eUu11cBFj9/nkDd+fNBs9ybqGCvfgynyn6e7NAITRnA==
  -----END PUBLIC KEY-----
  </code></pre>
  
  <p>If you have any idea how to do it with php (library) it could be great.
  Thanks to you ;)</p>