I using windows 10 creator and want to make a sample of php for test, but when run from commandline, it only showing the code
G:\xampp\htdocs\chat-box>php -v
PHP 5.6.30 (cli) (built: Jan 18 2017 19:48:22)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
G:\xampp\htdocs\chat-box>php bin\chat_server.php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use ChatWebSocket\Chat;
require dirname(__DIR__) . '/vendor/autoload.php';
$server = IoServer::factory(
new HttpServer(
new WsServer(
new Chat()
)
),
8080
);
print("Hello WebSocket!")
$server->run();
G:\xampp\htdocs\chat-box>
I have never get this before. Any problem with my command?
<?php