Skip to content

Instantly share code, notes, and snippets.

View atlance's full-sized avatar

Anton Stepanov atlance

  • Saint Petersburg
View GitHub Profile
@atlance
atlance / iteration-and-recursive-iteration.php
Created February 7, 2024 04:52 — forked from hakre/iteration-and-recursive-iteration.php
Iteration and Recursive Iteration Examples Code
<?php
/*
* Iteration and Recursive Iteration Examples Code
*
* @link http://stackoverflow.com/questions/12077177/how-does-recursiveiteratoriterator-works-in-php
* @author hakre <http://hakre.wordpress.com>
*/
### To have these examples to work, a directory with subdirectories is needed,
### I named mine "tree":
@atlance
atlance / Hooks.php
Created February 13, 2024 07:02 — forked from jasonvarga/Hooks.php
PHPUnit Test Hooks Extension
<?php
namespace Tests;
use PHPUnit\Runner\AfterLastTestHook;
use PHPUnit\Runner\BeforeFirstTestHook;
use PHPUnit\Runner\BeforeTestHook;
class Hooks implements BeforeFirstTestHook, AfterLastTestHook, BeforeTestHook
{
@atlance
atlance / Dockerfile
Created January 24, 2025 09:23 — forked from ziadoz/Dockerfile
Docker - PHP, Composer, Google Chrome and ChromeDriver
FROM php:8.0-fpm
# Copy Composer:
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Install PHP extensions:
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions zip