Download this file
1 2 3 4 5 6 7 8 9 10
<?php // No docbloc needed, the function is anonymous $var = function ($value = true) { if (in_array($value, array('+', '-'))) { return true; } }; echo $var('+');