Skip to content

Instantly share code, notes, and snippets.

View LostKoder's full-sized avatar
:octocat:
Evolving...

Lost Koder LostKoder

:octocat:
Evolving...
View GitHub Profile
@davebarnwell
davebarnwell / PHP composer tools.md
Last active March 9, 2026 14:18
Global installation of PHP tools with Composer

Global installation of PHP tools with Composer

To install a composer package globally, you run the usual require command, but with the addition of the global modifier. So to install PHPUnit, you would run:

$ composer global require phpunit/phpunit
$ composer global require phpunit/dbunit
$ composer global require phing/phing
$ composer global require phpdocumentor/phpdocumentor
$ composer global require sebastian/phpcpd
@jakzal
jakzal / crawler-edit.php
Last active January 22, 2024 13:18
Removing nodes with DomCrawler
<?php
<<<CONFIG
packages:
- "symfony/dom-crawler: ~2.3"
- "symfony/css-selector: ~2.3"
CONFIG;
use Symfony\Component\DomCrawler\Crawler;
$html = <<<HTML