3v4l.org

run code in 300+ PHP versions simultaneously
<?php define( 'ONETONE_THEME_BASE_URL', get_template_directory_uri()); define( 'ONETONE_OPTIONS_FRAMEWORK', get_template_directory().'/admin/' ); define( 'ONETONE_OPTIONS_FRAMEWORK_URI', ONETONE_THEME_BASE_URL. '/admin/'); define('ONETONE_OPTIONS_PREFIXED' ,'onetone_'); define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/admin/' ); require_once dirname( __FILE__ ) . '/admin/options-framework.php'; require_once get_template_directory() . '/includes/admin-options.php'; /** * Required: include options framework. **/ load_template( trailingslashit( get_template_directory() ) . 'admin/options-framework.php' ); /** * Mobile Detect Library **/ if(!class_exists("Mobile_Detect")){ load_template( trailingslashit( get_template_directory() ) . 'includes/Mobile_Detect.php' ); } /** * Theme setup **/ load_template( trailingslashit( get_template_directory() ) . 'includes/theme-setup.php' ); /** * custom post type **/ load_template( trailingslashit( get_template_directory() ) . 'includes/post-type.php' ); /** * Theme Functions **/ load_template( trailingslashit( get_template_directory() ) . 'includes/theme-functions.php' ); /** * Theme breadcrumb **/ load_template( trailingslashit( get_template_directory() ) . 'includes/class-breadcrumb.php'); /** * Theme widget **/ load_template( trailingslashit( get_template_directory() ) . 'includes/theme-widget.php' ); /** * google fonts **/ load_template( trailingslashit( get_template_directory() ) . 'includes/google-fonts.php' ); /** * shortcodes **/ load_template( trailingslashit( get_template_directory() ) . 'includes/shortcodes.php' ); /** * portfolio galleries **/ load_template( trailingslashit( get_template_directory() ) . 'includes/gallery/featured-galleries.php' ); /** * Woocommerce template **/ if (class_exists('WooCommerce')) { require_once (get_template_directory() .'/woocommerce/config.php'); } /** * Include the TGM_Plugin_Activation class. */ load_template( trailingslashit( get_template_directory() ) . 'includes/class-tgm-plugin-activation.php' ); add_action( 'tgmpa_register', 'onetone_theme_register_required_plugins' ); /** * Register the required plugins for this theme. * * In this example, we register two plugins - one included with the TGMPA library * and one from the .org repo. * * The variable passed to tgmpa_register_plugins() should be an array of plugin * arrays. * * This function is hooked into tgmpa_init, which is fired within the * TGM_Plugin_Activation class constructor. */ function onetone_theme_register_required_plugins() { /** * Array of plugin arrays. Required keys are name and slug. * If the source is NOT from the .org repo, then source is also required. */ $plugins = array( // This is an example of how to include a plugin pre-packaged with a theme array( 'name' => 'Revolution Slider', // The plugin name 'slug' => 'revslider', // The plugin slug (typically the folder name) 'source' => get_template_directory() . '/plugins/revslider.zip', // The plugin source 'required' => false, // If false, the plugin is only 'recommended' instead of required 'version' => '4.6.0', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins 'external_url' => '', // If set, overrides default API URL and points to an external URL ), array( 'name' => 'LayerSlider WP', // The plugin name 'slug' => 'LayerSlider', // The plugin slug (typically the folder name) 'source' => get_template_directory() . '/plugins/LayerSlider.zip', // The plugin source 'required' => false, // If false, the plugin is only 'recommended' instead of required 'version' => '5.1.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins 'external_url' => '', // If set, overrides default API URL and points to an external URL ) ); /** * Array of configuration settings. Amend each line as needed. * If you want the default strings to be available under your own theme domain, * leave the strings uncommented. * Some of the strings are added into a sprintf, so see the comments at the * end of each line for what each argument will be. */ $config = array( 'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to pre-packaged plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. 'strings' => array( 'page_title' => __( 'Install Required Plugins', 'onetone' ), 'menu_title' => __( 'Install Plugins', 'onetone' ), 'installing' => __( 'Installing Plugin: %s', 'onetone' ), // %s = plugin name. 'oops' => __( 'Something went wrong with the plugin API.', 'onetone' ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'onetone' ), // %1$s = plugin name(s). 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'onetone' ), // %1$s = plugin name(s). 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'onetone' ), // %1$s = plugin name(s). 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'onetone' ), // %1$s = plugin name(s). 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'onetone' ), // %1$s = plugin name(s). 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'onetone' ), // %1$s = plugin name(s). 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'onetone' ), // %1$s = plugin name(s). 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'onetone' ), // %1$s = plugin name(s). 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'onetone' ), 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'onetone' ), 'return' => __( 'Return to Required Plugins Installer', 'onetone' ), 'plugin_activated' => __( 'Plugin activated successfully.', 'onetone' ), 'complete' => __( 'All plugins installed and activated successfully. %s', 'onetone' ), // %s = dashboard link. 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. ) ); tgmpa( $plugins, $config ); }

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.3.60.0120.00316.75
8.3.50.0080.01221.00
8.3.40.0150.00618.76
8.3.30.0100.00618.58
8.3.20.0000.00820.33
8.3.10.0060.00321.90
8.3.00.0040.00419.79
8.2.180.0070.00718.14
8.2.170.0110.00422.96
8.2.160.0110.00720.29
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00717.75
8.2.110.0000.00821.05
8.2.100.0040.00717.91
8.2.90.0030.00919.20
8.2.80.0060.00317.97
8.2.70.0110.00017.63
8.2.60.0060.00617.93
8.2.50.0040.00418.07
8.2.40.0030.00621.05
8.2.30.0050.00319.72
8.2.20.0050.00317.79
8.2.10.0000.00818.11
8.2.00.0040.00418.11
8.1.280.0060.00925.92
8.1.270.0000.00823.99
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0100.00022.23
8.1.230.0110.00021.11
8.1.220.0000.00817.78
8.1.210.0040.00418.77
8.1.200.0070.00317.23
8.1.190.0070.00317.23
8.1.180.0000.00918.10
8.1.170.0040.00418.71
8.1.160.0040.00422.06
8.1.150.0040.00418.96
8.1.140.0040.00417.44
8.1.130.0030.00317.73
8.1.120.0000.00717.50
8.1.110.0050.00317.38
8.1.100.0000.00817.40
8.1.90.0070.00017.34
8.1.80.0060.00317.46
8.1.70.0030.00317.51
8.1.60.0000.00817.45
8.1.50.0000.00917.48
8.1.40.0000.00817.59
8.1.30.0100.00017.54
8.1.20.0040.00417.61
8.1.10.0030.00517.59
8.1.00.0040.00417.48
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.39
8.0.270.0000.00717.27
8.0.260.0000.00817.31
8.0.250.0040.00417.07
8.0.240.0030.00317.00
8.0.230.0000.01117.07
8.0.220.0030.00316.95
8.0.210.0040.00417.03
8.0.200.0000.00616.96
8.0.190.0090.00317.09
8.0.180.0040.00417.05
8.0.170.0050.00317.01
8.0.160.0050.00217.01
8.0.150.0040.00316.94
8.0.140.0040.00417.00
8.0.130.0030.00613.47
8.0.120.0010.00615.19
8.0.110.0050.00315.18
8.0.100.0010.00615.23
8.0.90.0040.00415.24
8.0.80.0070.00615.23
8.0.70.0050.00415.21
8.0.60.0070.00315.18
8.0.50.0070.00215.16
8.0.30.0090.00915.88
8.0.20.0100.01016.44
8.0.10.0030.00515.25
8.0.00.0120.00415.94
7.4.330.0060.00015.08
7.4.320.0000.00616.63
7.4.300.0030.00316.45
7.4.290.0000.00716.59
7.4.280.0040.00416.50
7.4.270.0030.00316.63
7.4.260.0040.00416.59
7.4.250.0080.00014.98
7.4.240.0060.00415.52
7.4.230.0070.00415.00
7.4.220.0120.00714.88
7.4.210.0050.00815.02
7.4.200.0030.00714.91
7.4.190.0110.00213.28
7.4.180.0090.00013.30
7.4.160.0100.00315.08
7.4.150.0050.01015.38
7.4.140.0080.00816.31
7.4.130.0090.00615.49
7.4.120.0090.00715.44
7.4.110.0090.00615.11
7.4.100.0050.01214.98
7.4.90.0080.00714.92
7.4.80.0110.00516.34
7.4.70.0070.00614.94
7.4.60.0100.00414.89
7.4.50.0050.00414.86
7.4.40.0130.00314.82
7.4.30.0150.00214.95
7.4.20.0000.00913.12
7.4.10.0090.00714.36
7.4.00.0040.01114.61
7.3.330.0000.00613.38
7.3.320.0000.00513.39
7.3.310.0070.00014.80
7.3.300.0050.00214.72
7.3.290.0050.01015.65
7.3.280.0090.00615.63
7.3.270.0050.01515.39
7.3.260.0090.00314.88
7.3.250.0070.00815.70
7.3.240.0100.00314.93
7.3.230.0070.00514.84
7.3.220.0050.00213.33
7.3.210.0080.00314.82
7.3.200.0080.00314.95
7.3.190.0050.00714.84
7.3.180.0070.00514.74
7.3.170.0080.00414.76
7.3.160.0110.00314.91
7.3.150.0020.00513.18
7.3.140.0060.00013.27
7.3.130.0070.00614.31
7.3.120.0050.00914.66
7.3.110.0100.00614.36
7.3.100.0080.00414.33
7.3.90.0050.00814.60
7.3.80.0040.00614.54
7.3.70.0100.00314.51
7.3.60.0060.00514.43
7.3.50.0030.00614.54
7.3.40.0050.00714.43
7.3.30.0040.00914.47
7.3.20.0060.00616.24
7.3.10.0060.00716.12
7.3.00.0060.00716.27
7.2.340.0050.00013.22
7.2.330.0100.00414.96
7.2.320.0030.01414.82
7.2.310.0070.00814.96
7.2.300.0070.00714.73
7.2.290.0120.00414.96
7.2.280.0080.00413.28
7.2.270.0080.00413.30
7.2.260.0090.00714.30
7.2.250.0100.00814.53
7.2.240.0080.00714.51
7.2.230.0050.00814.65
7.2.220.0050.00814.34
7.2.210.0070.00714.52
7.2.200.0090.00614.65
7.2.190.0050.00814.53
7.2.180.0090.00414.62
7.2.170.0080.00614.55
7.2.160.0020.01214.34
7.2.150.0070.00816.28
7.2.140.0020.01116.31
7.2.130.0050.00916.40
7.2.120.0040.01016.41
7.2.110.0070.00716.35
7.2.100.0060.00616.46
7.2.90.0070.00716.38
7.2.80.0080.00816.39
7.2.70.0070.00616.44
7.2.60.0040.01116.51
7.2.50.0090.00516.33
7.2.40.0050.00916.42
7.2.30.0060.00616.33
7.2.20.0030.01016.48
7.2.10.0050.00816.40
7.2.00.0070.00816.88
7.1.330.0080.00515.26
7.1.320.0050.00915.25
7.1.310.0060.00715.08
7.1.300.0060.00615.14
7.1.290.0020.00915.17
7.1.280.0080.00615.25
7.1.270.0050.01015.13
7.1.260.0090.00515.20
7.1.250.0060.00515.25
7.1.240.0080.00715.09
7.1.230.0070.00515.13
7.1.220.0060.00714.94
7.1.210.0050.00715.03
7.1.200.0060.00815.21
7.1.190.0070.00515.09
7.1.180.0100.00415.22
7.1.170.0060.00715.04
7.1.160.0070.00615.17
7.1.150.0040.00915.12
7.1.140.0060.00615.01
7.1.130.0060.00715.03
7.1.120.0050.00615.13
7.1.110.0040.00815.19
7.1.100.0040.00715.80
7.1.90.0070.00414.87
7.1.80.0070.00415.05
7.1.70.0040.00615.55
7.1.60.0090.00616.14
7.1.50.0070.00715.57
7.1.40.0030.01015.13
7.1.30.0050.00615.15
7.1.20.0070.00415.19
7.1.10.0090.00515.02
7.1.00.0070.02216.89
7.0.330.0070.00814.74
7.0.320.0090.00514.90
7.0.310.0080.00414.90
7.0.300.0060.00614.86
7.0.290.0070.00614.87
7.0.280.0040.00814.89
7.0.270.0050.00814.70
7.0.260.0030.00814.82
7.0.250.0110.00215.00
7.0.240.0070.00514.87
7.0.230.0030.00714.83
7.0.220.0070.00614.76
7.0.210.0050.00614.80
7.0.200.0070.00615.33
7.0.190.0030.00914.77
7.0.180.0050.00914.99
7.0.170.0090.00514.90
7.0.160.0060.00814.83
7.0.150.0070.00314.81
7.0.140.0080.00314.95
7.0.130.0080.00614.94
7.0.120.0070.00515.07
7.0.110.0080.00514.85
7.0.100.0060.01516.12
7.0.90.0080.02016.13
7.0.80.0040.01816.04
7.0.70.0120.01416.12
7.0.60.0070.02616.20
7.0.50.0050.02316.34
7.0.40.0060.01515.17
7.0.30.0080.01515.25
7.0.20.0050.02615.18
7.0.10.0070.02415.24
7.0.00.0070.01715.20
5.6.400.0050.00613.59
5.6.390.0110.00613.66
5.6.380.0060.00813.59
5.6.370.0050.00813.54
5.6.360.0080.00613.68
5.6.350.0060.00513.51
5.6.340.0060.00713.83
5.6.330.0060.00613.49
5.6.320.0060.00813.77
5.6.310.0060.00813.50
5.6.300.0040.00913.74
5.6.290.0050.00713.64
5.6.280.0030.01615.44
5.6.270.0060.00713.66
5.6.260.0050.00813.55
5.6.250.0050.01615.46
5.6.240.0050.02015.28
5.6.230.0080.02415.38
5.6.220.0070.01415.40
5.6.210.0070.02115.39
5.6.200.0050.02015.65
5.6.190.0050.03015.52
5.6.180.0080.02215.43
5.6.170.0050.01415.52
5.6.160.0040.02815.36
5.6.150.0060.01415.46
5.6.140.0050.01915.48
5.6.130.0070.01415.42
5.6.120.0090.02415.57
5.6.110.0080.01715.47
5.6.100.0050.02915.54
5.6.90.0080.02315.48
5.6.80.0080.02515.25
5.6.70.0080.01315.30
5.6.60.0050.02215.39
5.6.50.0090.02415.27
5.6.40.0070.01815.21
5.6.30.0070.02315.27
5.6.20.0070.02315.31
5.6.10.0070.02015.29
5.6.00.0050.01515.19
5.5.380.0050.01815.35
5.5.370.0070.01615.25
5.5.360.0080.02215.15
5.5.350.0080.02415.34
5.5.340.0060.01515.47
5.5.330.0100.02215.36
5.5.320.0050.02615.37
5.5.310.0050.02115.39
5.5.300.0060.01815.29
5.5.290.0090.01715.50
5.5.280.0050.02715.39
5.5.270.0070.02515.27
5.5.260.0070.02715.45
5.5.250.0070.02615.40
5.5.240.0070.01615.29
5.5.230.0060.02015.16
5.5.220.0070.02515.24
5.5.210.0070.02515.15
5.5.200.0090.02115.11
5.5.190.0110.02015.19
5.5.180.0080.02415.15
5.5.170.0120.00213.44
5.5.160.0060.02014.98
5.5.150.0070.02215.09
5.5.140.0070.01515.19
5.5.130.0060.02315.14
5.5.120.0050.02415.05
5.5.110.0070.02515.13
5.5.100.0110.01615.24
5.5.90.0040.02615.15
5.5.80.0090.02015.12
5.5.70.0060.02215.04
5.5.60.0060.02415.10
5.5.50.0080.02215.06
5.5.40.0070.01415.17
5.5.30.0090.01015.14
5.5.20.0090.02015.02
5.5.10.0080.01915.19
5.5.00.0050.01515.03
5.4.450.0050.01413.67
5.4.440.0040.01513.58
5.4.430.0060.02313.67
5.4.420.0040.02513.68
5.4.410.0040.02213.54
5.4.400.0050.02313.50
5.4.390.0050.01813.51
5.4.380.0040.02313.57
5.4.370.0050.02313.60
5.4.360.0050.02213.62
5.4.350.0030.01513.39
5.4.340.0060.02213.65
5.4.330.0040.00711.64
5.4.320.0060.02013.59
5.4.310.0060.01313.47
5.4.300.0040.01613.53
5.4.290.0060.01913.57
5.4.280.0050.01513.55
5.4.270.0070.02013.54
5.4.260.0050.01713.54
5.4.250.0050.02413.49
5.4.240.0050.01913.54
5.4.230.0060.01313.46
5.4.220.0040.01513.54
5.4.210.0060.02213.44
5.4.200.0040.02313.41
5.4.190.0050.01413.42
5.4.180.0060.02013.48
5.4.170.0070.02013.48
5.4.160.0060.02213.40
5.4.150.0070.01213.52
5.4.140.0030.02312.86
5.4.130.0040.01512.93
5.4.120.0060.01712.84
5.4.110.0050.01312.86
5.4.100.0060.01312.90
5.4.90.0050.01312.85
5.4.80.0080.02112.95
5.4.70.0050.02312.92
5.4.60.0040.02412.85
5.4.50.0050.02212.89
5.4.40.0060.02112.89
5.4.30.0050.01312.90
5.4.20.0050.01212.87
5.4.10.0030.02312.80
5.4.00.0050.01412.71

preferences:
50.22 ms | 401 KiB | 5 Q