Sieve with PHP, tested with PHPUnit