Skip to content

Instantly share code, notes, and snippets.

Anthony Chambers Antnee

  • Nottinghamshire
Block or report user

Report or block Antnee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Antnee / md5Bench.php
Created Feb 29, 2016
MD5 Performance Benchmark
View md5Bench.php
echo "\nTesting how many MD5s can be calculated in 10 seconds\n\n";
$password = 'MyT3ST_P4$$w0rD';
$runtime = 0;
$i = 0;
$done = false;
do {
Antnee / password_hash_cost_calculator.php
Created Feb 29, 2016
PHP password_hash() cost calculator
View password_hash_cost_calculator.php
* Password Hash Cost Calculator
* Set the ideal time that you want a password_hash() call to take and this
* script will keep testing until it finds the ideal cost value and let you
* know what to set it to when it has finished
// Milliseconds that a hash should take (ideally)
Antnee / UberHandler.php
Created Feb 19, 2016
Handle Exceptions and Throwables
View UberHandler.php
class UberHandler {
public function __construct($e)
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
Antnee / generator_return_types.php
Last active Sep 3, 2017
PHP 7 Generator Return Type
View generator_return_types.php
class Item {
private $id;
public function __construct(int $id)
$this->id = $id;
public function id() : int
Antnee / Vagrantfile
Last active Nov 23, 2017
Vagrant PHP 7 Apache 2.4 XDebug
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
View php7_structs.php
* Ideas for how I'd like to see structs implemented in PHP7
* In this example, structs are more like lightweight objects that have no
* methods, just properties. They can be "instantiated" and all properties will be
* null until defined later, as per classes. It is however not possible to set a
* value to a property that was not defined in the struct originally.
* Structs can extend other structs, much like classes can. Properties can also
You can’t perform that action at this time.