elephc elephc
HomeHow it worksFeaturesResourcesDocs
Home How it works Features Resources Docs

Getting Started

  • Installation
  • Your First Program

How-To

  • Build a Fiber Web Server

Compiling

  • Compiling Overview
  • The compilation pipeline
  • CLI reference
  • Targets and cross-compilation
  • Optimization and codegen controls
  • Output formats and diagnostics
  • Source maps
  • Linking, heap, and conditional compilation

PHP Syntax

  • Types
  • Operators
  • Control Structures
  • Functions
  • Strings
  • Regex
  • Arrays
  • Math
  • Classes
  • SPL
  • Namespaces
  • System & I/O
  • Streams
  • Magic Constants
  • Fibers
  • Generators
  • PDO (Databases)
  • Date and Time
  • Images
  • Calendar
  • Builtins

    • Builtins
    • Array builtins
    • Buffer builtins
    • Class builtins
    • Date builtins
    • Filesystem builtins
      • basename()
      • chdir()
      • chgrp()
      • chmod()
      • chown()
      • clearstatcache()
      • copy()
      • dirname()
      • disk_free_space()
      • disk_total_space()
      • file_exists()
      • fileatime()
      • filectime()
      • filegroup()
      • fileinode()
      • filemtime()
      • fileowner()
      • fileperms()
      • filesize()
      • filetype()
      • fnmatch()
      • getcwd()
      • getenv()
      • glob()
      • is_dir()
      • is_executable()
      • is_file()
      • is_link()
      • is_readable()
      • is_writable()
      • is_writeable()
      • lchgrp()
      • lchown()
      • link()
      • linkinfo()
      • lstat()
      • mkdir()
      • pathinfo()
      • putenv()
      • readfile()
      • readlink()
      • realpath()
      • realpath_cache_get()
      • realpath_cache_size()
      • rename()
      • rmdir()
      • scandir()
      • stat()
      • symlink()
      • sys_get_temp_dir()
      • tempnam()
      • tmpfile()
      • touch()
      • umask()
      • unlink()
    • IO builtins
    • JSON builtins
    • Math builtins
    • Misc builtins
    • Pointer builtins
    • Process builtins
    • Regex builtins
    • SPL builtins
    • Streams builtins
    • String builtins
    • Type builtins

Beyond PHP

  • Pointers
  • Buffers
  • Packed Classes
  • FFI & Extern
  • Conditional Compilation
  • Shared Libraries (cdylib)
  • Web Server (--web)
  • zval Bridge

Compiler Internals

  • What is a Compiler?
  • The Pipeline
  • The Lexer
  • The Parser
  • The Type Checker
  • The Optimizer
  • The Code Generator
  • The Runtime
  • Memory Model
  • Architecture
  • ARM64 Assembly
  • ARM64 Instructions
  • The EIR Design
  • Builtins

    • _internal builtins
    • array builtins
    • buffer builtins
    • class builtins
    • date builtins
    • filesystem builtins
    • io builtins
    • json builtins
    • math builtins
    • misc builtins
    • pointer builtins
    • process builtins
    • regex builtins
    • spl builtins
    • streams builtins
    • string builtins
    • type builtins
← All docs

copy()

Copies a file.

copy()

function copy(string $from, string $to): bool

Copies a file.

Parameters:

  • $from (string)
  • $to (string)

Returns: bool

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how copy is implemented in the compiler, see the internals page.

Previous

clearstatcache()

Next

dirname()