Skip to content

Instantly share code, notes, and snippets.

@EmanueleMinotto
EmanueleMinotto / gist:5990279
Created July 13, 2013 10:31
PHP Double access utility

Double access utility

This is an utility I made to access to common global variables in a mode I prefer: $_GET -> foo against $_GET['foo'].

Where's the utility?

  • you can use this function for other variables too
  • backward compatibility: array access is allowed too, so $_GET['foo'] is accepted
  • integer and float values will be converted from string to their respective values
  • usage on inclusion
  • prevent not defined cells errors
<?php
const ✓ = true;
const ✕ = false;
const ∞ = INF;
const γ = M_EULER;
const π = M_PI;
const e = M_E;
function ≠($left, $right) {

Install git:

sudo apt-get install git

Configure Git:

touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"

git config --global user.email "Your Email"

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup