Skip to content
This repository was archived by the owner on Jan 6, 2019. It is now read-only.
KasselerCMSPublic archive

About

PHP string compiler

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Compiler Component

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

The compiler converts the string data in php.

Requirements

  • PHP >= 5.4

Installation

$ composer require kasseler/compiler

Usage

$compiler = new Compiler('substr|md5|is_array'); //allow functions
$compiler->run("is_array([1, 2, 3, 5])"); //return true
$compiler->run("substr('my function compile', 3, 8)"); //return string 'function'
$compiler->run("[1, 2, 3, 4, 5]"); //return array [1, 2, 3, 4, 5]
$compiler->run('{"assoc":[1, 2, 3, 4, 5]}'); //return assoc array ['assoc' => [1, 2, 3, 4, 5]]
$compiler->run("md5('654')"); //return hash md5 'ab233b682ec355648e7891e66c54191b'
$compiler->run("true"); //return boolean true

About

PHP string compiler

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages