Created
July 3, 2019 19:52
-
-
Save dasl-/46c91c2c4890dd36f0e4b1a165a64a88 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
$stdin = fopen('php://stdin', 'r'); | |
while (true) { | |
$input = fgets($stdin); | |
if ($input == false) { | |
echo "php EOF!\n"; | |
break; | |
} | |
echo "php: " . $input; | |
if ($input === "ffmpeg dunzo\n") { | |
echo "php dunzo!\n"; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment