Instantly share code, notes, and snippets.

View openssl_encrypt_decrypt.md

Replace mcrypt_encrypt with openssl_encrypt

If you switch from PHP 5.x to 7.1 you will get the following message:

"Function mcrypt_encrypt() is deprecated"

Now it is the right time to refactor this old function :-)

function encrypt(string $data, string $key, string $method): string
View circle.yml
machine:
timezone:
Europe/Paris
php:
version: 7.0.3
environment:
ENVIRONMENT: testing
DB_URL: 127.0.0.1
View AbstractFoo.php
<?php
namespace Minitest;
abstract class AbstractFoo
{
protected function bar()
{
return $this->baz();
}
View supervisord.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.