Skip to content

Instantly share code, notes, and snippets.

View jrfnl's full-sized avatar
🐘
Herding 🐘

Juliette jrfnl

🐘
Herding 🐘
View GitHub Profile
@mindplay-dk
mindplay-dk / php-upgrades.md
Last active December 28, 2023 16:46
PHP upgrades

Upgrading PHP

Guidelines for upgrading the minimum PHP version requirements of packages and projects.

This isn't meant to be an exhaustive guide to upgrading, but as a checklist for the most important upgrades.

PHP 5.3

The first version to support namespaces - any relevant PHP packages/projects usually have this version as the minimum requirement, so this document won't concern itself with upgrades prior to that.

<?php
function spl_push_error_handler(ErrorHandler $handler, int $level = \E_ALL, int $priority = 0): void
{
// this function would be built into PHP, possibly with the addition of some extra functions to inspect and remove
// existing error handlers
// pushed error handlers would take priority over an error handlers set with set_errorhandler(), which would only be called
// if the error is not handled by a handler in the stack.
@mcclure
mcclure / add-to-Stylus-to-flag-nfts.css
Last active January 21, 2022 09:34
Download the "Stylus" browser extension and add this for all Twitter NFT users to be unambiguously flagged as such. Not written by me.
[style^='clip-path: url("#hex-hw-shapeclip-clipconfig");']
{
background-color: black;
}
[style^='clip-path: url("#hex-hw-shapeclip-clipconfig");']::before
{
background-color: black;
color: white;
content: "NFT USER lmao";
@ruudk
ruudk / README.md
Created December 8, 2022 15:35
How to find the files that are the slowest to analyze with PHPStan?

How to find the files that are the slowest to analyze with PHPStan?

For us, PHPStan became a bit slower with every release. We have a very large codebase with 10.000+ classes. There seem to be a few known issues related to big arrays.

See: phpstan/phpstan#8353 phpstan/phpstan#8146

To understand which files are problematic we run the following command: