3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once __DIR__ . '/../vendor/autoload.php'; /** Read configuration, cached or otherwise **/ $parser = new \Aurex\Framework\Config\Parser(new \Symfony\Component\Yaml\Parser); $cacher = (new \Aurex\Framework\Config\ParserCacherFactory)->make(); $parserCacher = new \Aurex\Framework\Config\ParserCacher($parser, $cacher); $config = $parserCacher->parseConfig(__DIR__ . '/../lib/Application/Config/global.yml'); /** Create relevant Environment **/ $environment = (new \Aurex\Framework\Environment\EnvironmentFactory)->create( $config['environment']['name'], $config['environment']['dir'] === '~' ? null : $config['environment']['dir'] ); /** Parse environment-specific configuration file **/ $configFile = sprintf('%s/../lib/Application/Config/%s.yml', __DIR__, $config['environment']['name']); $config = array_merge($config, $parserCacher->parseConfig($configFile)); /** Parse routes file **/ $routesFile = sprintf('%s/../lib/Application/Config/routes.yml', __DIR__); $config = array_merge($config, $parserCacher->parseConfig($routesFile)); /** Parse security file **/ $securityFile = sprintf('%s/../lib/Application/Config/security.yml', __DIR__); $config = array_merge($config, $parserCacher->parseConfig($securityFile)); /** Create the Auryn Dependency Injector **/ $injector = new \Auryn\Provider(new \Auryn\ReflectionPool); /** Create the object that decorates the Silex application **/ $aurex = new \Aurex\Framework\Aurex($environment, $injector, $config); /** Plug and play all the modules **/ $loader = new \Aurex\Framework\Module\ModuleLoader; foreach ($config['modules'] as $moduleName) { $loader->load($aurex, $moduleName); } /** Custom bootstrapping **/ require_once __DIR__ . '/../lib/Application/index.php'; /** Doctrine cli-config also uses this bootstrap for db etc, so don't run HTTP stuff if cli is being used **/ isset($cli) ?: $aurex->run();
Output for 8.0.13, 8.5.1 - 8.5.3
Warning: require_once(/in/../vendor/autoload.php): Failed to open stream: No such file or directory in /in/S91MU on line 3 Fatal error: Uncaught Error: Failed opening required '/in/../vendor/autoload.php' (include_path='.:') in /in/S91MU:3 Stack trace: #0 {main} thrown in /in/S91MU on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0
Warning: require_once(): open_basedir restriction in effect. File(/in/../vendor/autoload.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/S91MU on line 3 Warning: require_once(/in/../vendor/autoload.php): Failed to open stream: Operation not permitted in /in/S91MU on line 3 Fatal error: Uncaught Error: Failed opening required '/in/../vendor/autoload.php' (include_path='.:') in /in/S91MU:3 Stack trace: #0 {main} thrown in /in/S91MU on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.3.32 - 7.3.33, 7.4.33
Warning: require_once(/in/../vendor/autoload.php): failed to open stream: No such file or directory in /in/S91MU on line 3 Fatal error: require_once(): Failed opening required '/in/../vendor/autoload.php' (include_path='.:') in /in/S91MU on line 3
Process exited with code 255.
Output for 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Warning: require_once(): open_basedir restriction in effect. File(/in/../vendor/autoload.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/S91MU on line 3 Warning: require_once(/in/../vendor/autoload.php): failed to open stream: Operation not permitted in /in/S91MU on line 3 Fatal error: require_once(): Failed opening required '/in/../vendor/autoload.php' (include_path='.:') in /in/S91MU on line 3
Process exited with code 255.
Output for 7.1.20
Warning: require_once(): open_basedir restriction in effect. File(/in/../vendor/autoload.php) is not within the allowed path(s): (/tmp:/in) in /in/S91MU on line 3 Warning: require_once(/in/../vendor/autoload.php): failed to open stream: Operation not permitted in /in/S91MU on line 3 Fatal error: require_once(): Failed opening required '/in/../vendor/autoload.php' (include_path='.:') in /in/S91MU on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/S91MU on line 7
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S91MU on line 6 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S91MU on line 6 Parse error: syntax error, unexpected T_STRING in /in/S91MU on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S91MU on line 6 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S91MU on line 6 Parse error: parse error, unexpected T_STRING in /in/S91MU on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S91MU on line 6 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/S91MU on line 6 Parse error: parse error in /in/S91MU on line 6
Process exited with code 255.

preferences:
96.29 ms | 2416 KiB | 4 Q