klkmva / php-clipboard
A PHP wrapper for Windows, Linux, and Mac Copy to Clipboard commands
dev-stable
2026-09-29 18:51 UTC
Requires
- php: >=7.2
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-29 19:04:12 UTC
README
This is a 5-minute package I threw togehter that simply wraps the Mac, Windows, and (most common) Linux commands for copying contents to the clipboard. I don't handle reading files. You'll have to do that yourself. I simply pipe whatever contents you provide to the appropriate command based on the operating system reported by php_uname(). Originally created by Ed Grosvenor (https://github.com/edgrosvenor/php-clipboard). Dependencies updated (PHP >=7.2).
Installation
composer require klkmva/php-clipboard
Usage
<?php use klkmva\PHPClipboard\Clipboard; Clipboard.copy('string');