Use require_once instead

This commit is contained in:
2018-12-19 21:41:30 +00:00
parent 27944ac132
commit 43d1a9a658
4 changed files with 7 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<?php
require 'entryPoint.php';
require_once 'entryPoint.php';
if(!defined("STDIN")) {
define("STDIN", fopen('php://stdin','r'));
}
@@ -9,9 +9,10 @@ $msg_id = 0;
echo "Starting test REPL\n";
do {
echo $msg_id, ' > ';
$input = fread(STDIN, 80); // Read up to 80 characters or a newline
$trimmed = trim($input);
echo $msg_id, ' > ' , reply_user($room_id, $msg_id, $trimmed) , "\n";
echo reply_user($room_id, $msg_id, $trimmed) , "\n";
$msg_id++;
} while($trimmed !== "exit");