PHP Classes

File: examples/exampleglobal.php

Recommend this page to a friend!
  Classes of Jorge Castro   PHP Mini Language   examples/exampleglobal.php   Download  
File: examples/exampleglobal.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Mini Language
Execute string of a simple language conditions
Author: By
Last change:
Date: 4 years ago
Size: 383 bytes
 

Contents

Class file image Download
<?php
use eftec\minilang\MiniLang;

include
"../lib/MiniLang.php";
$variables=[]; // local variables
$callback=new stdClass();
$field1=1; // global variable
$mini=new MiniLang($callback,$variables);
$mini->separate('when $field1>0 then $field1=3'); // we prepare the language

$mini->evalAllLogic(); // we set the variables and run the languageand run the language
var_dump($field1);