Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.