PHP Classes

Is it better then an embedded web server?

Recommend this page to a friend!

      Mock HTTP Server  >  All threads  >  Is it better then an embedded web...  >  (Un) Subscribe thread alerts  
Subject:Is it better then an embedded web...
Summary:Is it better then a web server shipped with a php 5.4?
Messages:2
Author:Grigori Kochanov
Date:2012-09-28 09:15:48
Update:2012-09-28 09:26:28
 

  1. Is it better then an embedded web...   Reply   Report abuse  
Picture of Grigori Kochanov Grigori Kochanov - 2012-09-28 09:15:48
Is it better then
php.net/manual/en/features.commandl ...
?
Is it intended to be used with 5.3?

What about http://phpdaemon.net/ ?

  2. Re: Is it better then an embedded web...   Reply   Report abuse  
Picture of Lukasz Cepowski Lukasz Cepowski - 2012-09-28 09:26:28 - In reply to message 1 from Grigori Kochanov
Definitely not, it won't be as fast as the embedded php webserver but this is not ment to be used in production, I have created this for mocking http communication when testing php code on continous integration build farm.

Builds are being executed on three branches of php (5.2, 5.3 and 5.4) and they have to be isolated on the same machine.

This simple class can start a mock server on a random port connected with a process ID and log output to syslog, so you dont need to care about running a mock on a single http server and can do your tests in parallel.

And afterall it was quite fun to write it :)