Skip to content

Instantly share code, notes, and snippets.

%skip space \s
%token bracket_ \(
%token _bracket \)
%token comma ,
%token number (0|[1-9]\d*)(\.\d+)?([eE][\+\-]?\d+)?
%token plus \+
%token minus \-|−
%token pow \*\*
%token times \*|×
%token percent %
@stephpy
stephpy / gist:3187406
Created July 27, 2012 10:53
array_diff ...
<?php
function array_diff_simple($a, $b)
{
$r = array();
foreach($a as $key => $val) {
if(!isset($b[$key])) {
$r[$key] = $val;
} else {
if(is_array($b[$key]) && !is_array($val)) {