GithubHelp home page GithubHelp logo

corveda / phpsandbox Goto Github PK

View Code? Open in Web Editor NEW
220.0 15.0 45.0 3.39 MB

A PHP-based sandboxing library with a full suite of configuration and validation options.

Home Page: https://phpsandbox.org

License: Other

HTML 12.48% PHP 87.52%

phpsandbox's Introduction

PHPSandbox

A full-scale PHP 7.4+ sandbox class that utilizes PHP-Parser to prevent sandboxed code from running unsafe code.

It also utilizes FunctionParser to disassemble callables passed to the sandbox, so that PHP callables can also be run in sandboxes without first converting them into strings.

Manual: https://manual.phpsandbox.org

Online API Documentation: https://docs.phpsandbox.org

Latest Stable Version Total Downloads Latest Unstable Version License Dependency Status PHP Composer

Features:

  • Finegrained whitelisting and blacklisting, with sensible defaults configured.
  • Includes dynamic demonstration system that allows for local testing of custom sandbox configurations
  • Can redefine internal PHP and other functions to make them more secure for sandbox usage.
  • Can redefine superglobals and magic constants to expose your own values to sandboxed code.
  • Can overwrite the get_defined_* and get_declared_* functions to show only allowed functions, classes, etc. to the sandboxed code.
  • Can selectively allow and disallow function creation, class declarations, constant definitions, keywords, and much more.
  • Can prepend and append trusted code to setup and tear down the sandbox, and automatically whitelist the classes, functions, variables, etc. they define for the sandbox.
  • Can retrieve the generated sandbox code for later usage.
  • Can pass arguments directly to the sandboxed code through the execute method to reveal chosen outside variables to the sandbox.
  • Can access the parsed, prepared and generated code ASTs for further analysis or for serialization.
  • Can define custom validation functions for fine-grained control of every element of the sandbox.
  • Can specify a custom error handler to intercept PHP errors and handle them with custom logic.
  • Can specify a custom exception handler to intercept thrown exceptions and handle them with custom logic.
  • Can specify a validation error handler to intercept thrown validation errors and handle them with custom logic.
  • Can intercept callbacks and validate them against function whitelists and blacklists, even if they are called as strings

Example usage:

function test($string){
    return 'Hello ' . $string;
}

$sandbox = new PHPSandbox\PHPSandbox;
$sandbox->whitelistFunc('test');
$result = $sandbox->execute(function(){
   return test('world');
});

var_dump($result);  //Hello world

Custom validation example:

function custom_func(){
    echo 'I am valid!';
}

$sandbox = new PHPSandbox\PHPSandbox;
//this will mark any function valid that begins with "custom_"
$sandbox->setFuncValidator(function($function_name, PHPSandbox\PHPSandbox $sandbox){
    return (substr($function_name, 0, 7) == 'custom_');  //return true if function is valid, false otherwise
});
$sandbox->execute(function(){
    custom_func();
});
//echoes "I am valid!"

Custom validation error handler example:

$sandbox = new PHPSandbox\PHPSandbox;
//this will intercept parser validation errors and quietly exit, otherwise it will throw the validation error
$sandbox->setValidationErrorHandler(function(PHPSandbox\Error $error, PHPSandbox\PHPSandbox $sandbox){
    if($error->getCode() == PHPSandbox\Error::PARSER_ERROR){ //PARSER_ERROR == 1
        exit;
    }
    throw $error;
});
$sandbox->execute('<?php i am malformed PHP code; ?>');
//does nothing

Disable validation example:

$sandbox = new PHPSandbox\PHPSandbox;
//this will disable function validation
$sandbox->setOption('validate_functions', false); // or $sandbox->validate_functions = false;
$sandbox->execute('<?php echo system("ping google.com"); ?>');
//Pinging google.com. . .

Requirements

  • PHP 7.4+
  • PHP-Parser
  • FunctionParser (if you wish to use closures)
  • PHP should be compiled with --enable-tokenizer option (it typically is)

Installation

To install using composer, simply add the following to your composer.json file in the root of your project:

{
    "require": {
        "corveda/php-sandbox": "3.*"
    }
}

Then run composer install --dry-run to check for any potential problems, and composer install to install.

LICENSE

Copyright (c) 2013-2021 by Corveda, LLC.

Some rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.

    * The names of the contributors may not be used to endorse or
      promote products derived from this software without specific
      prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

phpsandbox's People

Contributors

aazon avatar aolko avatar asabirov avatar bryant1410 avatar ciaran-moore avatar enov avatar fieryprophet avatar filp avatar furgas avatar jecknig avatar mortenson avatar ne0h12 avatar peter279k avatar ramishscrapper avatar reiz avatar santouras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpsandbox's Issues

Configuring PHPSandbox to Allow Specific Methods While Restricting Direct Function Calls

Hello,

I am using PHPSandbox and have a specific requirement regarding function and method calls within the sandbox. Specifically, I would like to allow certain methods of a class to execute, even if they internally use functions that I want to restrict from being called directly by the user.

For example, I want to permit the method Biz::find() to be called, which internally uses various mysqli_* functions. However, I do not want to allow any direct calls to mysqli_* functions within the sandbox. Essentially, Biz::find() should be allowed, but any direct invocation of mysqli_connect(), mysqli_query(), etc., should be disallowed.

Here are some micro code examples to illustrate the requirement:

Desired Behavior:

class Biz {
    public static function find() {
        // Internally uses mysqli_* functions
        $mysqli = mysqli_connect("localhost", "user", "password", "database");
        // Other mysqli_* operations...
    }
}

// Allowed
Biz::find();

Undesired Behavior:

// Disallowed
$mysqli = mysqli_connect("localhost", "user", "password", "database");

PHPSandbox Configuration:

How can I configure PHPSandbox to allow Biz::find() but disallow direct calls to mysqli_* functions? I am looking for a way to specify this within the sandbox environment.

Thank you for your help.

Get all executed functions

Hello,

is there any way to get, at the end of the execution, all the functions that have been executed? Something similar to saving in an array all the $name that pass through the checkFunc method of PHPSandbox.php.

Thanks!

Fatal error: Cannot use isset() on the result of an expression

PHPSandbox throws an error if there's a check for a superglobal variable.

The code:

<?php
isset($_SERVER);
?>

The error message:

Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /.../vendor/corveda/php-sandbox/src/PHPSandbox.php(6885) : eval()'d code on line 8

Strings not escaped correctly in PHPSandbox::prepareVars

The following code will fail:

$sandbox = new PHPSandbox\PHPSandbox;
$sandbox->defineVar('test', "\\'");
$sandbox->execute("echo $test;")

The problem is caused by line 6487 in src/PHPSandbox.php:

$output[] = '$' . $name . " = '" . addcslashes($value, "'") . "'";

The string \' will be escaped to \\', so the \ will be considered as escaped by PHP but not the '.

Replacing the line by

$output[] = '$' . $name . " = '" . addcslashes($value, "'\\") . "'";

would solve the problem

defineFunc mangles callables

https://github.com/Corveda/PHPSandbox/blob/main/src/PHPSandbox.php#L2670

If you attempt to pass a non-static method callable in, for instance: [$instance, 'methodName'] it passes the callable typehint, then gets nuked by whatever that condition block is all about, and then throws an exception about being uncallable. Why?

And attempting to pass a nested array does not pass the callable typehint. I can workaround this by passing a closure to perform the same work, but this is still an issue.

In theory this would also break static class method calls in array syntax as well, possibly leading to bizarre or even dangerous behavior if the class name is still callable or invokable.

If instance methods are unsupported or otherwise should not be used, they should be checked for properly. Please do not mangle my callable.

Code with argument unpacking not working

Code:

function foo(int ...$a) {
	return $a;
}

$ints = [1,2];
foo(...$ints);

Result:
Compile Error: Cannot use positional argument after argument unpacking

Generated code causing the error:

return foo(\PHPSandbox\wrapByRef(...$ints, \PHPSandbox\PHPSandbox::getSandbox('__PHPSandbox_ff7c8ab064063e1d4d509dfbadda498e')));

Safe to run user's input code

I plan to use this library to run user's input code in isolated environment with most functions blacklisted by default. (On some relatively safe string and array manipulation). I wonder if there is any security that I should consider? I can imagine that all the SERVER, SESSION variables should be blacklisted or overriden as well?

SandboxedString and ReturnTypeWillChange

Please consider adding return types to SandboxedString methods (offsetSet and offsetUnset) to eliminate errors such as (in PHP >= 8.1):

Return type of PHPSandbox\SandboxedString::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Not working again

Please I don't know why this not working

<?php

require_once 'vendor/autoload.php';

use PHPSandbox\PHPSandbox;

function test($string){
    return 'Hello ' . $string;
}

class Server {
    public function sendMessage($message) {
        echo "Sending message: " . $message;
    }
}
$Server = new Server();

$sandbox = new PHPSandbox();
$sandbox->whitelistClass("Server");
$sandbox->whitelistVar("Server");
$sandbox->defineVars(['Server']);

$result = $sandbox->execute('<?php 
echo $Server->sendMessage("ping google.com");
?>');

var_dump($result);

Fatal error: Uncaught PHPSandbox\Error: Cannot define unnamed variable! in /data/data/com.termux/files/home/php/bota/vendor/corveda/php-sandbox/src/PHPSandbox.php:7195
Stack trace:
#0 /data/data/com.termux/files/home/php/bota/vendor/corveda/php-sandbox/src/PHPSandbox.php(2774): PHPSandbox\PHPSandbox->validationError('Cannot define u...', 203, NULL, '')
#1 /data/data/com.termux/files/home/php/bota/vendor/corveda/php-sandbox/src/PHPSandbox.php(2792): PHPSandbox\PHPSandbox->defineVar(0, 'Server')
#2 /data/data/com.termux/files/home/php/bota/test.php(21): PHPSandbox\PHPSandbox->defineVars(Array)
#3 {main}
thrown in /data/data/com.termux/files/home/php/bota/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7195

Wrong results when an element in an array, has a function name

For example :

$sandbox = new PHPSandbox;
function test ($values)
{
return $values;
}
$sandbox->whitelistFunc(['test','dd']);
$sandbox->allow_casting = true;

$result = $sandbox->execute(function(){
return test(['required','date', 'copy']);
});

print_r(
$result ,
);

Declare Global vars inside the Sandbox, and make them available only there...

Hi, is it possible to Declare Global vars inside the Sandbox, and make them available only there...?
I need this because i want to execute a lot of functions using same global vars => but i need to execute them in multithreading environment, so don't need them to access same var with same memory stack (same pointer), need to separate them without changing the Arhitecture and classes...

named argument not working

Fatal error: Cannot use positional argument after named argument in /data/data/com.termux/files/home/php/bota/vendor/corveda/php-sandbox/src/PHPSandbox.php(6990) : eval()'d code on line 28

Misbehaving

Why after sandbox throw error "Sandboxed code attempted to call invalid function: file_put_contents" it will still go ahead and run the code, Why?

Carrying a context through multiple executions

I was able to get my idea working with plain eval. See the code below:

function staticEval($_code)
{
    static $_vars = [];
    extract($_vars);
    $_result = eval($_code);
    $_vars = get_defined_vars();
    unset($_vars['_vars']);
    unset($_vars['_code']);
    unset($_vars['_result']);
    return $_result;
}

staticEval('$a = "hello world!";');
staticEval('echo "$a\n";');

Can I use for customize reports generators?

I have many customers and each one need a customizate reports. It's inviable create one code report to each one.

I think to create a report crud with a text editor box, in this box I will write the php code to run in phpSandbox (with restric environment obviosly) to agroup the mysql results (sql query would run out of sandbox and inject the result in phpSandbox) and build the report as my costumer wish.

Conclusion: I would use the phpSandbox(with restric environment) only to handle the pdf/excel generator to build the report.

Could I do that? Could have any security problem?

Code to run in sandbox:

$registers = sort($mysqlResultsInjected);

$excel = new Excel();

foreach($registers as $register) {
   $excel->row([$register->id, $register->name]);
}

$excel->output();

Run sandbox PHP code on multiple PHP versions

I came across this online PHP sandbox app similar to this project (closed source and not available except as an online service) http://sandbox.onlinephpfunctions.com/

I noticed it allows to run the PHP code on up to 62-63 different PHP versions!

I am curious, would it be difficult to allow a project like this to work across multiple PHP versions? I realize it would likely require the hosting server to have all the available PHP versions installed but was just curious if it might be easy to add support for this project to work across multiple versions when available?

Is it possible to redefine eval

I need to log every arguments before eval statement is executed. I know eval is a language construct, but still cant find a way to rewrite it.

The attempts gives me error message as below:
eval()'d code(3) : eval()'d code on line 1

So the question is, is it possible to rewrite a keyword or could I place a filter before eval is executed.

May be need make release

Hi! Latest release v2.0.1 released this on 20 May 2016

Now there are 11 commits not included in any of the releases.

image

Notice: constant PHP_EOL already defined

Hi.
First of all thanks for the outstanding job. Really useful.
Now the problem. In the PHP code I need to vaildate/sandbox in my project I use extensively the constant PHP_EOL. If I write code using this constant, "as is", i. e. without defining it in advance by means of $sandbox->define_consts(), the validator rises an exception complaining about the fact that the PHP_EOL isn't defined.
On the other hand, if I do define the const, upon execution of the sandboxed code (via $sanbox->execute("<code>")) the PHP engine issues a notice: "Notice: const PHP_EOL already defined".
This should not be a big issue per se if i wouldn't use the SandBox in an Ajax context.
Any, so to say, "uncontrolled" output from the PHP engine is deemed to break the response mechanism I set up for my ajax call. This forces me to suppress warning/notice output by means of the @ sign to prevent undesired output from breaking my response to the ajax call.
This is clearly a patch. Suppressing the PHP engine output will surely hide any "wanted" notification about the state of execution of the sandboxed code, making thus the use of the Sandbox almost useless.
Is there a way to circumvent this problem? Am I missing some important concept in the usage of this tool?

Thanks again

How to redefine a internal function

It says in the introduction that:

Can redefine internal PHP and other functions to make them more secure for sandbox usage.

So I have tried using defineFunc like below:

         $newSandbox=$this->sandbox->defineFunc("phpinfo", function(){
             echo "hellow phpinfo";
         });
         $newSandbox->whitelistFunc('phpinfo');
         #printHello('1\n');
         $newSandbox->execute(function(){
             phpinfo();
         });

But it seems doesn't work fine with eval statement. Furthermore, Could I have any method to inherit internal function other than totally rewrite it.

Best regrads.

Update nikic/php-parser to latest version

Hello,

Is there anything preventing you from using the latest version of nikic/php-parser (v.4)?
We have other dependencies in our projects which require the newer version (at least version 3) and we are having troubles with that.

PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED

I'm using php 8

[25-May-2023 14:13:07 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233
Stack trace:
#0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)
#1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)
#2 {main}
thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233
[25-May-2023 14:13:07 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233
Stack trace:
#0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)
#1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)
#2 {main}
thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233
[25-May-2023 14:13:09 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233
Stack trace:
#0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)
#1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)
#2 {main}
thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233
[25-May-2023 14:13:13 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233
Stack trace:
#0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)
#1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)
#2 {main}
thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233

Callable string variable invalid operations

When a variable is passed to a function, the sandbox wraps it with a "wrap" function. If the variable is a string with a callable value like "time", the "wrap" function returns a SandboxedString object. The target function receives the SandboxedString object instead of the string. Understand that the SandboxedString object was trying to prevent unsafe code to run by a callable variable. However, it has following issues.

  1. The gettype function in the target function returns "object" instead of "string". The var_dump and var_export functions are okay.
  2. Strict comparison of input values in the target function fail because they are objects instead of strings.
  3. I don't know if this could have any security concern because the SandboxedString passed into custom function contains a lot of information.

Following code replicates the issue. The gettype in obj_b->getValue returns "object". The strict comparison in obj_a->test returns "false" even the same strings are submitted to the function.

echo '001';
echo '<br>';

$execode = '';
$appcode = '';

$execode = 'class obj_a {' .
			'	function test($x, $y, $cusfun) {' .
			'		$a = $cusfun[\'b\']->getValue($x);' .
			'		$b = $cusfun[\'b\']->getValue($y);' .
			'		return ($a === $b);' .
			'	}' .
			'}' .
			'class obj_b {' .
			'	function getValue($x) {' .
			'		echo gettype($x) . \'<br>\';' .
			'		return $x;' .
			'	}' .
			'}' .
			'$cusfun[\'a\'] = new obj_a();' .
			'$cusfun[\'b\'] = new obj_b();';
			
$appcode = 'return $cusfun;';

echo '002';
echo '<br>';

$sandboxcusfun = new PHPSandbox\PHPSandbox;

$sandboxcusfun->setOptions(['allow_classes'=>1]);
$sandboxcusfun->defineVar('cusfun',null);

$cusfun = $sandboxcusfun->execute($execode . $appcode);

echo '003';
echo '<br>';
var_dump($cusfun);
echo '<br>';

$r = 'nothing';
if ($cusfun['a'] && method_exists($cusfun['a'], 'test')) {
	$r = $cusfun['a']->test('ob_clean','ob_clean',$cusfun);
}

echo '005';
echo '<br>';

var_dump($r);
echo '<br>';

echo '006';
echo '<br>';

Deprecated

Deprecated: Return type of FunctionParser\Tokenizer::seek($index) should either be compatible with SeekableIterator::seek(int $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 302

Deprecated: Return type of FunctionParser\Tokenizer::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 248

Deprecated: Return type of FunctionParser\Tokenizer::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 256

Deprecated: Return type of FunctionParser\Tokenizer::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 274

Deprecated: Return type of FunctionParser\Tokenizer::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 284

Deprecated: Return type of FunctionParser\Tokenizer::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 292

Deprecated: Return type of FunctionParser\Tokenizer::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 378

Deprecated: Return type of FunctionParser\Tokenizer::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 313

Deprecated: Return type of FunctionParser\Tokenizer::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 324

Deprecated: Return type of FunctionParser\Tokenizer::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 336

Deprecated: Return type of FunctionParser\Tokenizer::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 356

Deprecated: FunctionParser\Tokenizer implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Tokenizer.php on line 15

Deprecated: FunctionParser\Token implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /data/data/com.termux/files/home/php/bota/vendor/jeremeamia/functionparser/src/Token.php on line 21
string(11) "Hello world"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.