Skip to content

Instantly share code, notes, and snippets.

View craigmccreath's full-sized avatar

Craig McCreath craigmccreath

View GitHub Profile
@craigmccreath
craigmccreath / redactor.php
Last active January 13, 2022 17:47
Redact sensitive data from MySQL Databases (PHP 5.1+)
<?php
/**
* THE GREAT REDACTOR
*
* PHP Version 5.1+
*
* Use this in cases where data needs to be copied to a test environment. This will
* strip all data from fields as defined $redact. If you need to exclude some
* tables, add this to $excluded_tables.