Giter Club home page Giter Club logo

phpsmith's Introduction

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

phpsmith's People

Contributors

danil42russia avatar peakle avatar quasilyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

danil42russia

phpsmith's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.