Skip to content

Instantly share code, notes, and snippets.

View Ostico's full-sized avatar

Domenico Lupinetti Ostico

View GitHub Profile
<?php
/**
* Get the char code from a multi byte char
*
* 2/3 times faster than the old implementation
*
* @param $mb_char string Unicode Multibyte Char String
*
* @return int
@Ostico
Ostico / ObjectTest.php
Last active April 11, 2016 18:59
ObjectComparator does not check for Object Hash but internally knows that objects are different.
<?php
/**
* @author Domenico Lupinetti ostico@gmail.com
* Date: 11/04/16
* Time: 19.52
*
* The try block is executed but the comparison are made on Exporter::toArray()
* and if the object has no properties $expected and $actual are equals but refers to two different instances
* ( tried with PDO as example )
*