-
-
Save EmanueleMinotto/6528918 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const ✓ = true; | |
const ✕ = false; | |
const ∞ = INF; | |
const γ = M_EULER; | |
const π = M_PI; | |
const e = M_E; | |
function ≠($left, $right) { | |
return $left != $right; | |
} | |
function ≅($left, $right) { | |
return ($left > $right - 0.0001) && ($left < $right + 0.0001); | |
} | |
function ≡($left, $right) { | |
return $left === $right; | |
} | |
function ≢($left, $right) { | |
return $left !== $right; | |
} | |
function ∃($value, array $set) { | |
return false !== array_search($value, $set, true); | |
} | |
function ∄($value, array $set) { | |
return false === array_search($value, $set, true); | |
} | |
function ∩(array $set1, array $set2) { | |
return array_intersect($set1, $set2); | |
} | |
function ∪(array $set1, array $set2) { | |
return array_merge($set1, $set2); | |
} | |
function ⊂(array $subset, array $superset) { | |
return $subset == ∩($subset, $superset); | |
} | |
function ⊃(array $superset, array $subset) { | |
return ⊂($subset, $superset); | |
} | |
function ⊄(array $subset, array $superset) { | |
return !⊂($subset, $superset); | |
} | |
function ⊅(array $superset, array $subset) { | |
return !⊂($subset, $superset); | |
} | |
function √($value) { | |
return sqrt($value); | |
} | |
function ∛($value) { | |
return pow($value, 1/3); | |
} | |
function ∜($value) { | |
return pow($value, 1/4); | |
} | |
function ≮($left, $right) { | |
return $left >= $right; | |
} | |
function ≯($left, $right) { | |
return $left <= $right; | |
} | |
function ≰($left, $right) { | |
return $left > $right; | |
} | |
function ≱($left, $right) { | |
return $left < $right; | |
} | |
function ∏() { | |
return array_product(func_get_args()); | |
} | |
function ∑() { | |
return array_sum(func_get_args()); | |
} | |
function ∅() { | |
return array(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment