Download the PHP package m3m0r7/rubyvm-on-php without Composer

On this page you can find all versions of the php package m3m0r7/rubyvm-on-php. 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 rubyvm-on-php

RubyVM on PHP

The RubyVM on PHP is implementation RubyVM written in PHP 100%. Completely documentation not exists how to implement RubyVM, and I was referred Ruby source code when contributing this project.

Notice: This project is very ultra super hyper maximum experimental implementation

Notice: I tested Ruby version 3.2 and 3.3 only

See also

DEMO

Requirement

Currently status

Quick start

  1. Install via composer as following

  2. Save the below code as HelloWorld.rb

  3. Output .yarv file as following

  4. Create PHP file with below code and save as HelloWorld.php

  5. Run php HelloWorld.php and you will get outputted HelloWorld! from RubyVM.

Call defined ruby method on PHP

  1. Create ruby code as below:

And then, save file as test.rb

  1. Compile to YARV as below:

  2. Call ruby method on PHP as below:

You will get to output Hello World from Ruby!. In addition case, maybe you want to pass arguments. of course, it is available on. First time, to modify previous code as below.

Second time, to modify PHP code $executed->context()->callFromPHP() as following:

You will get to output Hello World! Here is passed an argument from PHP.

Use an executor debugger

The RubyVM on PHP is provided an executor debugger that can display processed an INSN and anymore into a table as following:

If you want to display above table then add below code from the Quick start.

_Notice: The executor debugger is using a lot of memories. We recommend to use disabling ordinarily. In depending on the case, may be using -d memory_limit=NEEDING_MEMORY_BYTES parameters to be working when calling php command_

Step by step debugging

The RubyVM on PHP is providing step by step debugger. It is available to confirm to process a sequence step by step. Which collect previous stacks, registered local tables and so on. this is required debugging this project.

When you enabled it, displays as below:

Custom method

The RubyVM on PHP has custom method in the main context. Try to call phpinfo as below Ruby code on the RubyVM on PHP:

Then you got displayed PHP Version: 8.2.7

Test

Linter

How to contribute

1) Build your ruby environment from source code with -DIBF_ISEQ_DEBUG flag

See: https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.html

2) When you built ruby environment, you will got vm.inc file which is wrote how to execute each INSN commands

3) You can get logging at ibf_load_** when running ruby code as following

The above logs is created below example code:

4) Refer it and now you can contribute to implement INSN command in the RubyVM on PHP

Other my toys


All versions of rubyvm-on-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
monolog/monolog Version ^3.4
symfony/console Version ^6.3
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 m3m0r7/rubyvm-on-php contains the following files

Loading the files please wait ....