A simple(ish) command line tool written in PHP 7.1 using Laravel Zero and Faker to help you anonymise/pseudonymise data within your database to support protecting either sensitive information, or peoples right to be forgotten with GDPR compliance.
The tool allows you to connect to either mysql, postgres, sqlite or sqlserver and replace defined information with random data to allow you to keep statistics/relationships/audit of actions etc.
It uses a simple yaml configuration file to define the conditions for overwriting, which fields you want to overwrite, and what to overwrite them with.
Tag: web development
Top 100 PHP functions
“Top 100 PHP functions” is a list of the top 100 most frequently used PHP functions, from the analysis of the 1,900 open source projects.  If you are still learning PHP, this list is a good overview of what you’ll see the most in real life projects.
15 Tips to Enhance your Github Flow
“15 Tips to Enhance your Github Flow” has lots and lots of good advice for anyone working with GitHub. Tips vary from PR templates all the way to automated dependency management and updates. Really useful!
Capture and Report JavaScript Errors with window.onerror
“Capture and Report JavaScript Errors with window.onerror” tutorial shows an easy way to capture, log and troubleshoot client-side errors:
onerror
 is a special browser event that fires whenever an uncaught JavaScript errorhas been thrown. It’s one of the easiest ways to log client-side errors and report them to your servers. It’s also one of the major mechanisms by which Sentry’s client JavaScript integration (raven-js) works.
window.onerror = function(msg, url, lineNo, columnNo, error) { // ... handle error ... return false; }
Weird operators in PHP
“Weird operators in PHP” covers a variety of awkward and weird operators in PHP. I don’t think I’ll ever write any code using any of these. But in case I come across any code in the future, that utilizes them, I should be sure to search back in the archives of this blog. Here’s an example to get you started:
X-fighters
In case you want to add some firepower to the previous fleet, you can summon X-fighters to the PHP source : +-0-+. The following code adds 3 to $a.
$a = $a +-0-+ 3;