Skip to content

Instantly share code, notes, and snippets.

Khoa Nguyen khoand0000

Block or report user

Report or block khoand0000

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
khoand0000 /
Last active May 23, 2018
install php7, pear, mysql, PHP_CodeSniffer by homebrew

Install php7 with pear

$ brew tap homebrew/dupes
$ brew tap homebrew/versions
$ brew tap homebrew/homebrew-php
$ brew install php70 --with-pear

Enable php7 with apache2

khoand0000 /
Last active Jan 12, 2016
Code style when using underscore in php
  • I am using the php underscore
  • Use closures and assign them to variables
  • Put variables at begin of the function, main code will after ////////
  • Must be
function sumPrice($items) {
  $sum = function ($memo, $item) {
    return $memo + $item['price'];
You can’t perform that action at this time.