02.6: Get Line

How do we read input from the command line?


https://www.youtube.com/watch?v=ktZDghnD12I





<?php
# * getline

$stdin = fopen( 'php://stdin', 'r' );


while ($line = fgets( $stdin ))    {
    print "$line";
}

?>