node.js - Equivalent to NodeJS buffer() in PHP -


i'm facing following problem. need convert following nodejs code php can't find php function gets job done.

nodejs code:

var secret = 'how today?';     new buffer(secret, 'hex');     new buffer(secret, 'base64'); 

returns this

<buffer 1e 8c 1a ad ec a8 ba da 1d 6b 2f> 

i've looked @ php pack() doesn't seem job done.

any appreciated!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -