#!/usr/bin/env php handle = fopen($opened_path, $mode); $this->position = 0; // remove all traces of this stream wrapper once it has been used stream_wrapper_unregister('composer-bin-proxy'); return (bool) $this->handle; } public function stream_read($count) { $data = fread($this->handle, $count); if ($this->position === 0) { $data = preg_replace('{^#!.*\r?\n}', '', $data); } $this->position += strlen($data); return $data; } public function stream_cast($castAs) { return $this->handle; } public function stream_close() { fclose($this->handle); } public function stream_lock($operation) { return $operation ? flock($this->handle, $operation) : true; } public function stream_tell() { return $this->position; } public function stream_eof() { return feof($this->handle); } public function stream_stat() { return fstat($this->handle); } public function stream_set_option($option, $arg1, $arg2) { return true; } } } if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { include("composer-bin-proxy://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon'); exit(0); } } include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';