Is this possible from a PHP file

```
$var1 = 1  
$var2 = 2  
$output = `./a.out $var1 $var2 `

```

or 

```
$output = exec(./a.out $var1 $var2);

```

consider a.out to be the C program executable. 

Where $var1 and $var2 are passed as command line arguements? If this is not possible, is there any other easier way of passing php variables as input to my C program executable?

Thanks!