Skip to content

Instantly share code, notes, and snippets.

@sbstjn
Created June 30, 2016 08:57
Show Gist options
  • Save sbstjn/b04c59a39774630b88bcddb85f92513f to your computer and use it in GitHub Desktop.
Save sbstjn/b04c59a39774630b88bcddb85f92513f to your computer and use it in GitHub Desktop.
<?php
use some\namespace\{ClassA, ClassB, ClassC as C};
use function some\namespace\{fn_a, fn_b, fn_c};
use const some\namespace\{ConstA, ConstB, ConstC};
class Example {
private $logger;
public function __construct() {
$this->init();
}
private function init($options = array()) {
usort($options, function($a, $b) {
return $a.size > $b.size ? -1 : 1;
});
}
private function lorem() {
return array_map(function(array $array): int {
return array_sum($array);
}, $arrays);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment