Skip to content

Commit

Permalink
add cli input
Browse files Browse the repository at this point in the history
  • Loading branch information
nrenvoise-ubitransport committed Jan 12, 2022
1 parent 53401a1 commit 82db04d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions input/cli_ask_input.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

$someVariableHere = readline("Enter a string: ");

echo "$someVariableHere\n";

// more efficient:
echo "Enter a string: ";
fscanf(STDIN, "%s", $someVariableHere);

echo "$someVariableHere\n";

0 comments on commit 82db04d

Please sign in to comment.