Skip to content

Instantly share code, notes, and snippets.

@dhotson
Created October 30, 2013 02:40
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 dhotson/7226433 to your computer and use it in GitHub Desktop.
Save dhotson/7226433 to your computer and use it in GitHub Desktop.
<?php
// Find files of all classes loaded..
$loader = require('vendor/autoload.php');
$files = array_filter(array_map(function($c) use ($loader) {
return $loader->findfile($c);
}, get_declared_classes()));
// Better solution.. find all required files
array_map(function($f) use ($i) {
inotify_add_watch($i, $f, IN_CLOSE_WRITE);
}, get_required_files());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment