Skip to content

Instantly share code, notes, and snippets.

View hollodotme's full-sized avatar
🧑‍💻
On it

Holger Woltersdorf hollodotme

🧑‍💻
On it
View GitHub Profile
@hollodotme
hollodotme / generatorForEach.php
Created November 7, 2018 19:24
Comparison of generator with foreach and yield from
<?php declare(strict_types=1);
class Test
{
private $arr = [];
public function __construct()
{
for ( $i = 0; $i < 10000; $i++ )
{
@hollodotme
hollodotme / phplint.sh
Last active December 17, 2020 08:29
PHP linting shell script - suitable for usage in PHP alpine docker containers
#!/usr/bin/env sh
OPTIND=1
EXITCODE=0
# Default parallelization
PARALLELIZE=2
# Default file name pattern
FILENAME_PATTERN='*.php'
echo "PHP linting - looking for syntax errors in PHP files."