-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimplified.php
More file actions
executable file
·60 lines (52 loc) · 930 Bytes
/
simplified.php
File metadata and controls
executable file
·60 lines (52 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* SimplifiedPHP
* @author Nate Ferrero
*/
/**
* SimplifiedPHP Version
*/
if (!defined('VERSION')) {
define('VERSION', '0.0.1');
define('SPHP', __FILE__);
}
/**
* Capture SimplifiedPHP Code and Execute
*/
if (defined('SIMPLIFIED')) {
sphp_eval(ob_get_clean());
exit;
}
/**
* Done function for command line scripts
*/
else {
function done () {
sphp_eval(ob_get_clean());
exit;
}
}
/**
* Error Handler
*/
set_error_handler(function($num, $str, $file, $line) {
throw new ErrorException($str, $num, 1, $file, $line);
});
/**
* Include Engine
*/
require_once(__DIR__ . '/lib/engine.php');
require_once(__DIR__ . '/lib/parse.php');
require_once(__DIR__ . '/lib/run.php');
require_once(__DIR__ . '/lib/source.php');
/**
* Command Line Interface
*/
if (defined('CLI')) {
require_once('lib/cli.php');
}
/**
* Capture SimplifiedPHP Code
*/
define('SIMPLIFIED', true);
ob_start();