Skip to content

Instantly share code, notes, and snippets.

View dlundgren's full-sized avatar

David Lundgren dlundgren

View GitHub Profile
@num8er
num8er / polyfills.php
Last active September 13, 2023 14:33
PHP 5.3 to 7.x migration polyfill collection.
<?php
namespace Polyfills
{
final class Ereg
{
public static function ereg($pattern, $string, &$regs = null)
{
if ($pattern === '' || $pattern === null) {
trigger_error('ereg(): REG_EMPTY', E_USER_WARNING);