Created
November 25, 2016 08:44
-
-
Save jbenesch/bc0c03e7544e89ab2e932b187e9d1e59 to your computer and use it in GitHub Desktop.
Evaluate a string of javascript in php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo shell_exec("/usr/local/bin/node ./test.js " . json_encode(array('foo' => 'bar'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(process.argv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment