If you use the command line interface (CLI SAPI), you may be interested by the 3 standard input/output streams (STDIN, STDOUT & STDERR) described at: https://www.php.net/manual/en/features.commandline.io-streams.php