Download the PHP package suzunone/code-runner without Composer

On this page you can find all versions of the php package suzunone/code-runner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package code-runner

CodeRunner

example workflow

Introduction

paiza.io API unofficial wrapper. Using the Paiza API, compile and execute arbitrary code in a variety of programming languages.

Notice for using

This package use paiza.io API. So please read term of use (Japanese only).

Installation Instructions

Composer

Example

Example1

Source code

Results

API Reference

Suzunone\CodeRunner\CodeRunner

constants.

CodeRunner::LANG_C (string)

C Language constant

CodeRunner::LANG_CPP (string)

C++ Language constant

CodeRunner::LANG_OBJECTIVE_C (string)

Objective-C Language constant

CodeRunner::LANG_JAVA (string)

Java Language constant

CodeRunner::LANG_KOTLIN (string)

Kotlin Language constant

CodeRunner::LANG_SCALA (string)

Scala Language constant

CodeRunner::LANG_SWIFT (string)

Swift Language constant

CodeRunner::LANG_CSHARP (string)

C# Language constant

CodeRunner::LANG_GO (string)

GO Language constant

CodeRunner::LANG_HASKELL (string)

Haskell Language constant

CodeRunner::LANG_ERLANG (string)

Erlang Language constant

CodeRunner::LANG_PERL (string)

Perl Language constant

CodeRunner::LANG_PYTHON (string)

Python2 Language constant (string)

CodeRunner::LANG_PYTHON3 (string)

Python3 Language constant

CodeRunner::LANG_RUBY (string)

Ruby Language constant

CodeRunner::LANG_PHP (string)

PHP Language constant

CodeRunner::LANG_BASH (string)

Bash Language constant

CodeRunner::LANG_R (string)

R Language constant

CodeRunner::LANG_JAVASCRIPT (string)

JavaScript Language constant

CodeRunner::LANG_COFFEESCRIPT (string)

CoffeeScript Language constant

CodeRunner::LANG_VB (string)

VB Language constant

CodeRunner::LANG_COBOL (string)

Cobol Language constant

CodeRunner::LANG_FSHARP (string)

F# Language constant

CodeRunner::LANG_D (string)

D Language constant

CodeRunner::LANG_CLOJURE (string)

Clojure Language constant

CodeRunner::LANG_ELIXIR (string)

Elixir Language constant

CodeRunner::LANG_MYSQL (string)

MySQL Language constant

CodeRunner::LANG_RUST (string)

Rust Language constant

CodeRunner::LANG_SCHEME (string)

Scheme Language constant

CodeRunner::LANG_COMMON_LISP (string)

Common Lisp Language constant

CodeRunner::LANG_NADESIKO (string)

なでしこ Language constant

CodeRunner::LANG_TYPESCRIPT (string)

TypeScript Language constant

CodeRunner::LANG_PLAIN (string)

PlainText Language constant

CodeRunner::LANGS (array)

CodeRunner::EXTENSIONS (array)

CodeRunner::STATUS_RUNNING (string)

is status already running.

CodeRunner::STATUS_COMPLETED (string)

is status already completed.

CodeRunner::create()

Start compiling and executing the program code.

Parameters:

Parameter Type Description
$source_code string program code
$language string language constant
$input string string passed in standard input
$longpoll bool Wait for compilation and execution to complete.
$longpoll_timeout int longpoll timeout time.

Return:

CodeRunner::getTemplate()

Returns a template of the program code according to the language constants.

Parameters:

Parameter Type Description
$language string language constant

Return:

CodeRunner::getLanguageName()

Get the program name according to the language constant.

Parameters:

Parameter Type Description
$language string language constant

Return:

CodeRunner::getLangExtension()

Get the program file extension according to the language constant.

Parameters:

Parameter Type Description
$language string language constant

Return:

CodeRunner::getApiKey()

Get the API Key.

Parameters:

Return:

CodeRunner::setApiKey()

Set the API Key.

Parameters:

Parameter Type Description
$api_key string API KEY

Return:

\Suzunone\CodeRunner\Entities\OutputEntityInterface

Get the compilation and execution status of a program

OutputEntityInterface::status()

Parameters:

Return:

OutputEntityInterface::details()

Get the results of compiling and executing a program.

Parameters:

Return:

OutputEntityInterface::getResponse()

Get Response data.

Parameters:

Return:

\Suzunone\CodeRunner\Entities\Output\CreateEntity

properties

Properties Type Description
$id string [readonly] session id(This should be used in get_status/get_details API)
$status string [readonly] running', 'completed'
$error string [readonly] error message.
$is_error bool [readonly] if error is true
$is_completed bool [readonly] if completed is true
$is_running bool [readonly] if running is true

\Suzunone\CodeRunner\Entities\Output\StatusEntity

properties

Properties Type Description
$id string [readonly] session id(This should be used in get_status/get_details API)
$status string [readonly] running', 'completed'
$is_error bool [readonly] if error is true
$is_completed bool [readonly] if completed is true
$is_running bool [readonly] if running is true

\Suzunone\CodeRunner\Entities\Output\DetailsEntity

properties

Properties Type Description
id string Session id
language string language
note string note
status string status('running', 'completed')
build_stdout ?string build output to stdout
build_stderr ?string build output to stderr
build_exit_code int build exit code
build_time ?int build time(second)
build_memory ?int build memory usage(bytes)
build_result ?int build result('success', 'failure', 'error')
stdout ?string code output to stdout
stderr ?string code output to stderr
exit_code int exit code
time int time to run(seconds)
memory int code memory usage(bytes)
result string code result('success', 'failure', 'error')
$is_completed bool [readonly] if completed is true
$is_running bool [readonly] if running is true

All versions of code-runner with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-json Version *
guzzlehttp/guzzle Version ^7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package suzunone/code-runner contains the following files

Loading the files please wait ....