How to start interactive php mode ( php -a ) with preliminary execution of certain commands?
The -B ( --process-begin ) option seems to be exactly what I want, but it looks like it cannot be combined with `-a ::
$ php -B '$x = true; echo $x;' -a Either execute direct code, process stdin or use a file.
The php binary must be called from another php script and then passed to the user.
Is it possible to pass the code before passing?
Or is there another PHP option that you can use?
source share