Example #1
0
 public function testEval()
 {
     $t = new \Test\EvalTest();
     $this->assertSame(2, $t->evalCode('1 + 1'));
 }
Example #2
0
 public function testEval()
 {
     $t = new \Test\EvalTest();
     $this->assertSame(2, $t->evalCode('return 1 + 1;'));
     $this->assertSame(8, $t->evalCode('$g = pow(2, 2); return $g * 2;'));
 }