phpsmith

module
v0.0.0-...-365fb26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: MIT

README

phpsmith

Tests Go Report Card Go Reference

logo

phpsmith creates random PHP and KPHP programs to test their compilers and runtimes.

It can create both valid (but very contrived) and invalid programs.

Features
  • Random valid php code generation
  • Random invalid php code generation
  • Reproducible program generation by seed
  • Big generation variability
How it works

Phpsmith can be executed in two modes: fuzz, generate:

  • fuzz:

    • infinitely generate php programs
    • run it on php and kphp
    • catch exceptions, segmentation faults, fatal errors
    • compare results between php and kphp
    • save diff in logs
  • generate:

    • generate php program by provided seed
Installation
go install github.com/quasilyte/phpsmith
Pre-installation requirements
  • php ≥7.0
  • kphp ≥9.3.0
Usage

Run phpsmith without arguments to get help output.

Possible commands are:

  version     print phpsmith version info to stdout and exit
  fuzz        run fuzzing using the provided configuration
  generate    generate a program using the provided configuration

fuzz command examples:

phpsmith fuzz -o ~/phpsmith_out

generate command examples:

phpsmith generate -seed 1651182107

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL