Created
April 8, 2020 23:22
-
-
Save DaveRandom/40750f26613fc384376595a1a44a49b9 to your computer and use it in GitHub Desktop.
Execute batch file as PHP script (one line shebang for PHP scripts on Windows)
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
@(<nul set /p=#! & type ^"%~f0^") | php -- %* & goto :eof | |
<?php declare(strict_types=1); | |
// script goes here | |
var_dump($argv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment