Skip to content

Instantly share code, notes, and snippets.

@jbenesch

jbenesch/example.php

Created Nov 25, 2016
Embed
What would you like to do?
Evaluate a string of javascript in php
<?php
echo shell_exec("/usr/local/bin/node ./test.js " . json_encode(array('foo' => 'bar')));
console.log(process.argv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.