What is PHP's pendant to pythons encode('hex')?
<p>In python you can encode a string as</p>

<pre><code>encoded = text.encode('hex')
text = encoded.decode('hex')
</code></pre>

<p>What are the corresponding functions in php?</p>
