Built-in javascript interpreter for php

Is there an api for embedding javascript in php - something similar to Jint for .NET.

I would like to allow the user to customize the workflow, having access to the limited php classes and methods that can be executed on the server side.

The user writes a block of code that runs later ... for example, js / ecma script code like ...

if (Contact.Age < 12){
  Contact.setEligibility = false;
}
else{
  Contact.setEligibility = true;
}
+3
source share
1 answer

-Javascript, phpjs ( php, javascript), . JS- ( PHP), Javascript PHP5: http://j4p5.sourceforge.net/ - JS, DOM .

"" Javascript, PECL. http://pecl.php.net/package/spidermonkey ( PHP-).

+5

Source: https://habr.com/ru/post/1780145/


All Articles