Last active
February 1, 2019 02:26
-
-
Save StolenThunda/fa974496b6ad95037699d22791ca221b to your computer and use it in GitHub Desktop.
Print string name of var
This file contains 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
function print_var_name($var) { | |
\!h foreach($GLOBALS as $var_name => $value) { | |
if ($value === $var) { | |
return $var_name; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment