Download the PHP package issadicko/kodi-script without Composer
On this page you can find all versions of the php package issadicko/kodi-script. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download issadicko/kodi-script
More information about issadicko/kodi-script
Files in issadicko/kodi-script
Download issadicko/kodi-script
More information about issadicko/kodi-script
Files in issadicko/kodi-script
Vendor issadicko
Package kodi-script
Short Description A lightweight, embeddable scripting language for PHP applications
License MIT
Homepage https://github.com/issadicko/kodi-script-php
Package kodi-script
Short Description A lightweight, embeddable scripting language for PHP applications
License MIT
Homepage https://github.com/issadicko/kodi-script-php
Please rate this library. Is it a good library?
Informations about the package kodi-script
KodiScript PHP SDK
A lightweight, embeddable scripting language for PHP applications.
📖 Documentation complète : docs-kodiscript.dickode.net
Installation
Quick Start
Features
- Variables:
let x = 10 - Functions:
fn(a, b) { return a + b } - Control Flow:
if,else,for-in,while - Data Types: numbers, strings, booleans, arrays, objects
- Null Safety:
?.(safe access),?:(elvis operator) - 50+ Native Functions: string, math, random, type, array, JSON, encoding, crypto, date/time
🔌 Extensibility
KodiScript is designed to be extensible. You can add your own native functions.
Custom Functions
Laravel Integration Example
API Reference
KodiScript::eval(source, variables)
Evaluates a script and returns the result value. Throws on error.
KodiScript::run(source, variables)
Runs a script with optional variables and returns ScriptResult.
KodiScript::builder(source)
Creates a builder for advanced configuration.
Native Functions
| Category | Functions |
|---|---|
| String | toString, toNumber, length, substring, toUpperCase, toLowerCase, trim, split, join, replace, contains, startsWith, endsWith, indexOf |
| Math | abs, floor, ceil, round, min, max, pow, sqrt, sin, cos, tan, log, log10, exp |
| Random | random, randomInt, randomUUID |
| Type | typeOf, isNull, isNumber, isString, isBool |
| Array | size, first, last, reverse, slice, sort, sortBy |
| JSON | jsonParse, jsonStringify |
| Encoding | base64Encode, base64Decode, urlEncode, urlDecode |
| Crypto | md5, sha1, sha256 |
| Date/Time | now, date, time, datetime, timestamp, formatDate, year, month, day, hour, minute, second, dayOfWeek, addDays, addHours, diffDays |
Other Implementations
| Language | Package |
|---|---|
| Kotlin | Maven Central |
| Go | pkg.go.dev |
| Dart | pub.dev |
| TypeScript | npm |
License
MIT
All versions of kodi-script with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
The package issadicko/kodi-script contains the following files
Loading the files please wait ...