Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
<?php | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |
Monokai color to Sherwin-Williams mapping
(monokai-blue-light "#89BDFF") -> SW 6961 BLUE BEYOND
(monokai-gray "#595959") -> SW 7048 URBANE BRONZE
(monokai-gray-darker "#383830") -> SW 6258 TRICORN BLACK
(monokai-gray-darkest "#141411") -> SW 6990 CAVIAR
(monokai-gray-lightest "#595959") -> SW 7048 URBANE BRONZE
(monokai-gray-light "#E6E6E6") -> SW 6539 SOOTHING WHITE
(monokai-green "#A6E22A") -> SW 6920 CENTER STAGE
(monokai-green-light "#A6E22E") -> [SW 6920 CENTER STAGE]
public function actionMigrate()
{
// Keep current application
$oldApp = \Yii::$app;
// Load Console Application config
$config = require \Yii::getAlias('@app'). '/config/console.php';
new \yii\console\Application($config);
$result = \Yii::$app->runAction('migrate', ['migrationPath' => '@app/migrations/', 'interactive' => false]);
// Revert application
$ php some-bench.php | |
strtotime: 0.15609812736511 | |
datetime: 0.31521701812744 | |
datetime without instanciation: 0.11794400215149 | |
custom: 0.70522284507751 |