3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); $errorLoggingType = 3; // writeErrorLog sends output to a file in the storage folder (default behavior) //$errorLoggingType = 0; // writeErrorLog sends output to the server log set_include_path( $scriptpath . PATH_SEPARATOR . get_include_path() ); // get the S-Drive configuration if it exists @include_once 'SdriveConfig.php'; // initialize the singleton with the form-name // the global $myPage is used in older code, don't remove it! $myPage = FormPage::GetInstance( $myName ); if( isset( $sdrive_config ) ) { $errorLoggingType = 0; // better send writeErrorLog output to the server log // $myPage->sdrive is initialized to false Config::GetInstance()->LoadConfig( $sdrive_config ); if( isset( $sdrive_model ) ) Config::GetInstance()->sdrive_model = $sdrive_model; // on S-Drive the cart scripts are taken directly from the resources $buildnum = Config::GetInstance()->GetConfig( 'resource_version' ); if( ! $buildnum ) writeErrorLog( 'Parameter missing or empty in form.cfg.dat', 'resource_version' ); $cartpath = CC_HOSTING_RESOURCES . DIRECTORY_SEPARATOR .'FB' . DIRECTORY_SEPARATOR . $buildnum . DIRECTORY_SEPARATOR . 'fb'; set_include_path( get_include_path() . PATH_SEPARATOR . $cartpath ); // add this constant to the file names to include instead of adding it to the include path // as a type of name spacing define( 'CARTREVISION', 'cartapp' ); } else { // A version number is added to the folder name for forward compatibility. FB increments this // number if changes are NOT backward compatible. FB must also create the corrresponding // folder (leaving the old folder for forms made and uploaded with a previous version). define( 'CARTREVISION', 'cartapp_v1' ); Config::GetInstance()->LoadConfig(); } // catch warnings with our own error handler to ignore them as appropriate set_error_handler( 'myErrorHandler', E_WARNING ) ; /*** end of global config ***/ /*********** utility functions ************/ // define our auto-loader for classes function __autoload( $class_name ) { global $scriptpath; include $scriptpath . '/fbapp/php/' . strtolower( $class_name ) . '.cls.php'; } // shows warning more user-friendly function myErrorHandler( $errno, $errstr, $errfile, $errline ) { // some fopen() may fail because the files are optional if( strpos( $errstr, 'fopen') !== false ) return false; $page = FormPage::GetInstance(); // the rules may contain an invalid regexp if( strpos( $errstr, 'preg_match' ) !== false && strpos( $errfile, 'validator.inc.php' ) !== false ) { $msg = _T('Error validating RegEx magic field') . substr( $errstr , strrpos( $errstr, ':') ); } else { // default message $msg = 'Warning: [ err ' . $errno . '/line '. $errline . substr( $errfile, strrpos( $errfile, '/' ) ) . '] ' . $errstr; } if( $page ) { $page->SetErrors( array( array( 'warn' => $msg ) ) ); } else { $errors = array( 'warn' => $msg ); include 'fbapp/inc/displayerrors.inc.php'; exit(0); } return true; } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.1.130.0140.00417.40
8.1.120.0180.00017.41
8.1.110.0140.00517.36
8.1.100.0150.00517.36
8.1.90.0120.00417.35
8.1.80.0120.00517.33
8.1.70.0130.00317.38
8.1.60.0130.00517.53
8.1.50.0130.00817.56
8.1.40.0160.00417.53
8.1.30.0140.00517.56
8.1.20.0100.01017.55
8.1.10.0190.00317.48
8.1.00.0090.00917.36
8.0.260.0130.00317.33
8.0.250.0160.00317.33
8.0.240.0150.00417.33
8.0.230.0040.01417.33
8.0.220.0110.00417.33
8.0.210.0100.00517.33
8.0.200.0110.00517.33
8.0.190.0180.00017.33
8.0.180.0190.00017.33
8.0.170.0150.00617.33
8.0.160.0180.00017.33
8.0.150.0160.00017.33
8.0.140.0080.00817.33
8.0.130.0130.00317.33
8.0.120.0070.00717.33
8.0.110.0160.00017.33
8.0.100.0160.00317.33
8.0.90.0100.00717.33
8.0.80.0100.00717.33
8.0.70.0150.00017.33
8.0.60.0090.00617.33
8.0.50.0080.00817.33
8.0.30.0180.00017.33
8.0.20.0130.00317.33
8.0.10.0170.00017.33

preferences:
158.81 ms | 1068 KiB | 8 Q