0

I'm trying to understand the HipHop documentation, but it's not very clear. I have a PHP script I want to compile into an executable with HipHop.

How do I pass arguments to this PHP executable by command line? And how is this received by the PHP script ($_GET['arg']?)

I want to do something like this: my_compiled_script --variablename="This is the value"

Which is then received by the script as: $_GET['variablename']

So how does that work?

Alasdair
  • 13,348
  • 18
  • 82
  • 138
  • 2
    Unless Hiphop only builds executables with built-in webserver, you might get cmdline args in `$_SERVER["argv"]` as in regular PHP. Otherwise set `QUERY_STRING=` in the shell to poison `$_GET` – mario Nov 05 '11 at 07:00

1 Answers1

0

Figured it out with some testing.

As mario said above, the arguments come in exactly the same format as when running PHP: they start at $argv[1] ($argv[0] is empty).

Alasdair
  • 13,348
  • 18
  • 82
  • 138