13

How do I silent output of PHP built-in server?

I tried

php -S 127.0.0.1:80 -t public/ > /dev/null

but it still output

[Thu Jun 11 13:08:53 2015] 127.0.0.1:60963 [200]: /
Petra Barus
  • 3,815
  • 8
  • 48
  • 87

2 Answers2

9

The character > just redirects standard output. If you want to redirect standard error and standard output you can use >&

php -S 127.0.0.1:80 -t public/ >& /dev/null
chim
  • 8,407
  • 3
  • 52
  • 60
c4pone
  • 777
  • 7
  • 17
3

Try this:

php -q -S 127.0.0.1:80 -t public/

use -q option for Quiet-mode

Mahdi Hasanpour
  • 126
  • 1
  • 5