Skip to content

Instantly share code, notes, and snippets.

@tml
Created July 5, 2018 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tml/5575091fb1bce7431dc37cbaa9628342 to your computer and use it in GitHub Desktop.
Save tml/5575091fb1bce7431dc37cbaa9628342 to your computer and use it in GitHub Desktop.
<?php
$path = '';
foreach(array_filter(explode('/', '/var/run/memcached/memcached.socket')) as $p) {
$path .= '/'.$p;
if (file_exists($path)) {
echo "{ '$path' : ", json_encode(stat($path)), "} \n";
} else {
echo "PHP cannot see $path.\n";
exit(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment