
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@uniter/phpcore
Advanced tools
Minimal PHP core library for PHP environments.
After getting started with Uniter and PHPRuntime, you might want only a subset of the standard PHP library. You can include PHPCore and then only expose the builtin functions, classes or constants you need.
var phpCore = require('phpcore');
phpCore.install({
functionGroups: [
function (internals) {
return {
'add_one_to': function (argReference) {
return internals.valueFactory.createInteger(argReference.getNative() + 1);
}
};
}
],
classes: {
'TwentyOne': function () {
function TwentyOne() {}
TwentyOne.prototype.getIt = function () {
return 21;
};
return TwentyOne;
},
'My\\Tools\\Worker': function () {
function Worker() {}
Worker.prototype.run = function () {
console.log('running');
};
return Worker;
}
},
constantGroups: [
function (internals) {
return {
'MY_CONSTANT': 1000
};
}
]
});
phpCore.compile(
// Example JS code transpiled from PHP by PHPToJS:
function (stdin, stdout, stderr, tools, namespace) {
var namespaceScope = tools.createNamespaceScope(namespace), namespaceResult, scope = tools.globalScope, currentClass = null;
return tools.valueFactory.createInteger(
namespaceScope.getConstant('MY_CONSTANT').getNative() +
namespaceScope.getFunction('add_one_to')(tools.valueFactory.createInteger(21)).getNative()
);
}
)().execute().then(function (result) {
console.log(result.unwrapForJS()); // Prints "1022"
});
FAQs
Minimal PHP core library for PHP environments
The npm package @uniter/phpcore receives a total of 4 weekly downloads. As such, @uniter/phpcore popularity was classified as not popular.
We found that @uniter/phpcore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.

Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.

Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.