How can I use javascript in php command line. When I write
<script>documen.Write("Hello World.");</script>
it's printing same things.
You have a typo on document.write()
, although that won't matter anyway as javascript can only execute in a browser a javascript shell.
Also, it appears you are not the first person to ask this question: