3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Process { /** * Ensures the process is running or terminated, throws a LogicException if the process has a not started. * * @param $functionName The function name that was called. * * @throws LogicException If the process has not run. */ public function requireProcessHasRun($functionName) { if (true) { throw new LogicException(sprintf('Process must be started before calling %s.', $functionName)); } } } $p = new Process(); $p->requireProcessHasRun('S');

preferences:
44.08 ms | 402 KiB | 5 Q