public static function glob_recursive( $path ) {
		$files = [];
		if ( preg_match( '/\\' . DIRECTORY_SEPARATOR . 'vendor$/', $path ) ) {
			return $files;
		}

		foreach ( glob( $path . '/*' ) as $file ) {
			if ( is_dir( $file ) ) {
				$files = array_merge( $files, static::glob_recursive( $file ) );
			} elseif ( preg_match( '/\.php$/', $file ) ) {
				$files[] = $file;
			}
		}

		return $files;
	}
public static function glob_recursive( $path ) {
		$files = [];
		if ( preg_match( '/\\' . DIRECTORY_SEPARATOR . 'vendor$/', $path ) ) {
			return $files;
		}

		foreach ( glob( $path . '/*' ) as $file ) {
			if ( is_dir( $file ) ) {
				$files = array_merge( $files, static::glob_recursive( $file ) );
			} elseif ( preg_match( '/\.php$/', $file ) ) {
				$files[] = $file;
			}
		}

		return $files;
	}
public static function glob_recursive ( $ path ) { $ files = [ ] ; if ( preg_match ( '/\\' . DIRECTORY_SEPARATOR . 'vendor$/' , $ path ) ) { return $ files ; } foreach ( glob ( $ path . '/*' ) as $ file ) { if ( is_dir ( $ file ) ) { $ files = array_merge ( $ files , static :: glob_recursive ( $ file ) ) ; } elseif ( preg_match ( '/\.php$/' , $ file ) ) { $ files [ ] = $ file ; } } return $ files ; }
Returns PHP file list

@param string Directory path
@return array PHP file list
Returns PHP file list