3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @package gm_Tracking */ /* Plugin Name: User-tracking codes for GM Plugin URI: http://www.groupemoniteur.fr/ Description: Adds js codes for user-tracking Version: 1.0 Author: Pierre GERRIER Author URI: mailto:pierre@gerrier.fr License: GPLv2 or later */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ if(!class_exists('gmTracking')) { class gmTracking { static protected $default_trackers = array( 'CookieApprovalTracking' ); static public function get_defined_trackers() { $trackers = apply_filters('gm_tracking_default_trackers', self::$default_trackers); foreach($trackers as $tracker) { require_once(dirname(__FILE__) . '/gm_Tracking/' . $tracker . '.php'); } return apply_filters('gm_tracking_defined_trackers', $trackers); } static public function display_trackings() { $trackers = static::get_defined_trackers(); $codes = array(); foreach($trackers as $tracker) { if(class_exists($tracker)) { // TODO: add enable/disable flags $codes[$tracker] = $tracker::get_tracking_code(); } } echo implode($codes); } static public function admin_bar_init() { if(!is_super_admin() || !is_admin_bar_showing() || (isset($_SERVER['SCRIPT_NAME']) && 'wp-login.php' == basename($_SERVER['SCRIPT_NAME']))) { return; } add_action('admin_bar_menu', array(__CLASS__, 'admin_bar_menu'), 1000); } static public function admin_bar_menu(WP_Admin_Bar $wp_admin_bar) { $wp_admin_bar->add_menu(array( 'id' => 'gm-tracking', 'title' => 'Tracking', )); $trackers = static::get_defined_trackers(); foreach($trackers as $tracker) { if(class_exists($tracker)) { $wp_admin_bar->add_menu(array( 'id' => 'gm-tracking-' . $tracker, 'parent' => 'gm-tracking', 'title' => $tracker::get_admin_bar_label(), )); if(false !== $content = $tracker::get_admin_bar_content()) { if(!is_array($content)) { $content = array($content); } foreach($content as $k => $v) { $wp_admin_bar->add_menu(array( 'id' => 'gm-tracking-' . $tracker . '-' . $k, 'parent' => 'gm-tracking-' . $tracker, 'title' => $v, )); } } } } } } } if(class_exists('gmTracking')) { // add_action('wp_footer', array('gmTracking', 'display_trackings')); // add_action('admin_bar_init', array('gmTracking', 'admin_bar_init')); }

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.70.0110.01116.75
8.3.60.0180.00416.50
8.3.50.0140.00522.85
8.3.40.0180.00318.55
8.3.30.0110.00319.14
8.3.20.0080.00020.38
8.3.10.0000.00823.62
8.3.00.0040.00419.25
8.2.180.0140.00716.50
8.2.170.0120.00322.96
8.2.160.0150.00020.34
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.01519.11
8.2.110.0070.00321.08
8.2.100.0060.00617.59
8.2.90.0040.00417.78
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0050.00317.80
8.2.50.0040.00418.07
8.2.40.0000.00918.03
8.2.30.0040.00419.51
8.2.20.0040.00417.64
8.2.10.0000.00717.94
8.2.00.0040.00417.70
8.1.280.0090.00925.92
8.1.270.0040.00723.97
8.1.260.0000.00726.35
8.1.250.0060.00328.09
8.1.240.0060.00322.41
8.1.230.0100.00021.10
8.1.220.0080.00017.74
8.1.210.0060.00318.93
8.1.200.0000.01017.23
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0030.00718.58
8.1.160.0070.00022.03
8.1.150.0070.00018.75
8.1.140.0070.00017.28
8.1.130.0000.00717.82
8.1.120.0000.00717.40
8.1.110.0000.00817.45
8.1.100.0040.00417.34
8.1.90.0000.00717.45
8.1.80.0000.00717.47
8.1.70.0000.00717.32
8.1.60.0060.00317.59
8.1.50.0080.00017.54
8.1.40.0040.00417.38
8.1.30.0040.00417.63
8.1.20.0040.00417.64
8.1.10.0040.00417.44
8.1.00.0040.00417.41
8.0.300.0000.00719.86
8.0.290.0040.00416.75
8.0.280.0000.00918.41
8.0.270.0030.00317.13
8.0.260.0000.00617.15
8.0.250.0040.00416.83
8.0.240.0030.00316.95
8.0.230.0070.00016.92
8.0.220.0070.00016.82
8.0.210.0040.00416.86
8.0.200.0000.00716.93
8.0.190.0020.00516.89
8.0.180.0040.00416.84
8.0.170.0000.00716.87
8.0.160.0040.00416.83
8.0.150.0000.00716.80
8.0.140.0040.00416.70
8.0.130.0030.00313.29
8.0.120.0070.00315.01
8.0.110.0060.00315.07
8.0.100.0100.00015.06
8.0.90.0020.00814.96
8.0.80.0070.00615.04
8.0.70.0040.00614.97
8.0.60.0070.00214.98
8.0.50.0020.00815.09
8.0.30.0130.00415.74
8.0.20.0100.00816.06
8.0.10.0080.00215.17
8.0.00.0100.00415.57
7.4.330.0000.00515.09
7.4.320.0000.00716.46
7.4.300.0070.00016.55
7.4.290.0040.00416.32
7.4.280.0030.00316.54
7.4.270.0030.00316.48
7.4.260.0030.00316.56
7.4.250.0040.00414.80
7.4.240.0080.00115.46
7.4.230.0040.00614.93
7.4.220.0050.01214.88
7.4.210.0060.00814.91
7.4.200.0090.00014.92
7.4.190.0000.01113.33
7.4.180.0070.00013.20
7.4.160.0090.00514.93
7.4.150.0070.00915.38
7.4.140.0060.00916.29
7.4.130.0090.00715.34
7.4.120.0110.00515.32
7.4.110.0110.00514.91
7.4.100.0060.00514.88
7.4.90.0060.00614.91
7.4.80.0070.00416.29
7.4.70.0070.00814.78
7.4.60.0040.00714.77
7.4.50.0000.00714.67
7.4.40.0010.01014.64
7.4.30.0050.00614.79
7.4.20.0030.00313.09
7.4.10.0000.00613.25
7.4.00.0020.00813.95
7.3.330.0000.00513.15
7.3.320.0030.00313.00
7.3.310.0050.00214.79
7.3.300.0030.00314.64
7.3.290.0060.00614.67
7.3.280.0060.00815.42
7.3.270.0040.01015.30
7.3.260.0020.00914.71
7.3.250.0070.00515.26
7.3.240.0060.00714.81
7.3.230.0060.00414.71
7.3.220.0020.00213.11
7.3.210.0030.00814.76
7.3.200.0070.00616.26
7.3.190.0060.00814.80
7.3.180.0040.00714.72
7.3.170.0040.00714.74
7.3.160.0050.00614.67
7.3.150.0000.00813.03
7.3.140.0030.00312.98
7.3.130.0050.00013.13
7.3.120.0030.00312.98
7.3.110.0030.00313.09
7.3.100.0060.00013.06
7.3.90.0050.00013.25
7.3.80.0060.00013.15
7.3.70.0000.00613.27
7.3.60.0000.00613.38
7.3.50.0000.00713.35
7.3.40.0000.00613.45
7.3.30.0050.00013.37
7.3.20.0060.00015.00
7.3.10.0000.00514.86
7.3.00.0030.00315.09
7.2.340.0120.00013.35
7.2.330.0100.00814.74
7.2.320.0100.00414.85
7.2.310.0090.00914.94
7.2.300.0130.00314.95
7.2.290.0090.00814.89
7.2.280.0120.00013.05
7.2.270.0080.00413.29
7.2.260.0060.00613.15
7.2.250.0040.00813.09
7.2.240.0080.00413.10
7.2.230.0110.00213.11
7.2.220.0090.00313.26
7.2.210.0090.00313.28
7.2.200.0100.00413.45
7.2.190.0120.00013.41
7.2.180.0100.00313.23
7.2.170.0080.00513.43
7.2.160.0080.00413.38
7.2.150.0130.00015.13
7.2.140.0040.00815.16
7.2.130.0090.00315.29
7.2.120.0100.00215.23
7.2.110.0100.00215.10
7.2.100.0100.00215.20
7.2.90.0130.00015.26
7.2.80.0120.00015.23
7.2.70.0070.00715.20
7.2.60.0140.00115.93
7.2.50.0090.00415.20
7.2.40.0060.00615.30
7.2.30.0100.00315.10
7.2.20.0100.00315.16
7.2.10.0060.00615.14
7.2.00.0020.01117.26
7.1.330.0060.00614.21
7.1.320.0070.00414.04
7.1.310.0110.00014.10
7.1.300.0090.00314.30
7.1.290.0100.00214.09
7.1.280.0040.00914.24
7.1.270.0120.00214.27
7.1.260.0120.00014.24
7.1.250.0060.00614.16
7.1.240.0120.00014.17
7.1.230.0110.00014.23
7.1.220.0040.00914.25
7.1.210.0120.00014.20
7.1.200.0070.00614.89
7.1.190.0080.00414.34
7.1.180.0040.00814.29
7.1.170.0130.00014.16
7.1.160.0060.00614.14
7.1.150.0040.00814.20
7.1.140.0080.00514.03
7.1.130.0040.00814.16
7.1.120.0100.00214.18
7.1.110.0120.00014.03
7.1.100.0180.00815.61
7.1.90.0080.00414.16
7.1.80.0120.00014.08
7.1.70.0060.00415.41
7.1.60.0050.01316.83
7.1.50.0170.00624.53
7.1.40.0040.00813.98
7.1.30.0100.00314.23
7.1.20.0120.00013.98
7.1.10.0090.00314.14
7.1.00.0080.03818.27
7.0.330.0060.00613.96
7.0.320.0040.00813.97
7.0.310.0000.01213.98
7.0.300.0120.00014.00
7.0.290.0120.00014.08
7.0.280.0120.00014.07
7.0.270.0030.00914.05
7.0.260.0070.00414.11
7.0.250.0090.00314.21
7.0.240.0060.00614.27
7.0.230.0080.00314.27
7.0.220.0090.00214.04
7.0.210.0120.00014.00
7.0.200.0040.00715.34
7.0.190.0060.00614.03
7.0.180.0120.00014.18
7.0.170.0100.00614.15
7.0.160.0090.00314.06
7.0.150.0100.00214.06
7.0.140.0060.03818.07
7.0.130.0080.00414.12
7.0.120.0090.00214.14
7.0.110.0100.00214.02
7.0.100.0060.00614.20
7.0.90.0080.00614.08
7.0.80.0080.00414.06
7.0.70.0060.00613.91
7.0.60.0090.03917.07
7.0.50.0080.03515.88
7.0.40.0070.04317.13
7.0.30.0120.04617.20
7.0.20.0230.03817.09
7.0.10.0110.04017.10
7.0.00.0090.03917.18
5.6.400.0040.00812.65
5.6.390.0130.00012.36
5.6.380.0120.00012.61
5.6.370.0100.00312.75
5.6.360.0060.00612.61
5.6.350.0120.00012.73
5.6.340.0080.00312.47
5.6.330.0120.00012.73
5.6.320.0080.00312.72
5.6.310.0110.00012.56
5.6.300.0000.01212.36
5.6.290.0120.00012.78
5.6.280.0040.04016.82
5.6.270.0070.00412.67
5.6.260.0110.00012.59
5.6.250.0060.00612.60
5.6.240.0070.00412.68
5.6.230.0080.00412.88
5.6.220.0080.00412.74
5.6.210.0060.03916.73
5.6.200.0050.03515.47
5.6.190.0080.03416.79
5.6.180.0170.04016.67
5.6.170.0170.03116.66
5.6.160.0090.03416.61
5.6.150.0060.04515.52
5.6.140.0080.02315.38
5.6.130.0120.03915.44
5.6.120.0070.02516.96
5.6.110.0050.04216.91
5.6.100.0070.04016.78
5.6.90.0090.04516.93
5.6.80.0090.04116.50
5.6.70.2320.02016.63
5.6.60.0050.00512.52
5.6.50.0040.00712.39
5.6.40.0060.00612.51
5.6.30.0070.00412.81
5.6.20.0050.00512.43
5.6.10.0080.00312.67
5.6.00.0060.00612.74
5.5.380.0090.00312.93
5.5.370.0070.00412.63
5.5.360.0080.00412.56
5.5.350.0140.03316.51
5.5.340.0060.02115.21
5.5.330.0030.03916.42
5.5.320.0140.02516.41
5.5.310.0260.03316.35
5.5.300.0060.02815.29
5.5.290.0050.04715.28
5.5.280.0080.02016.63
5.5.270.0100.03116.77
5.5.260.0050.02316.68
5.5.250.0110.04016.69
5.5.240.0150.03316.41
5.5.230.0070.00512.80
5.5.220.0110.00012.45
5.5.210.0070.00412.52
5.5.200.0070.00512.53
5.5.190.0050.00512.36
5.5.180.0070.00412.59
5.5.170.0000.01112.51
5.5.160.0050.00512.41
5.5.150.0050.00512.25
5.5.140.0050.00512.47
5.5.130.0090.00312.36
5.5.120.0040.00712.41
5.5.110.0080.00412.24
5.5.100.0040.00712.50
5.5.90.0120.00012.61
5.5.80.0030.00712.66
5.5.70.0060.00412.50
5.5.60.0100.00012.40
5.5.50.0040.00712.45
5.5.40.0030.00812.45
5.5.30.0070.00412.47
5.5.20.0050.00512.69
5.5.10.0070.00312.68
5.5.00.0090.00212.56
5.4.450.0200.02715.99
5.4.440.0290.01815.97
5.4.430.0150.02216.09
5.4.420.0090.02016.06
5.4.410.0190.02715.93
5.4.400.0200.02515.85
5.4.390.0160.01915.78
5.4.380.0200.04015.61
5.4.370.0170.03015.48
5.4.360.0120.03215.67
5.4.350.0180.03315.57
5.4.340.0260.02515.69
5.4.330.0110.00012.50
5.4.320.0070.02312.45
5.4.310.0080.02012.52
5.4.300.0040.02212.41
5.4.290.0060.02112.53
5.4.280.0080.01712.38
5.4.270.0080.02312.48
5.4.260.0070.02112.54
5.4.250.0070.02112.43
5.4.240.0070.01912.44
5.4.230.0070.02012.41
5.4.220.0090.01812.42
5.4.210.0070.02112.23
5.4.200.0060.02112.28
5.4.190.0070.01812.37
5.4.180.0060.02312.35
5.4.170.0090.01912.47
5.4.160.0070.02312.28
5.4.150.0080.01912.30
5.4.140.0070.02312.21
5.4.130.0080.02112.24
5.4.120.0080.02012.36
5.4.110.0050.02612.36
5.4.100.0080.01812.29
5.4.90.0060.02012.36
5.4.80.0040.02312.20
5.4.70.0100.01512.31
5.4.60.0080.01712.31
5.4.50.0080.01712.29
5.4.40.0060.02012.27
5.4.30.0080.01812.17
5.4.20.0060.02412.29
5.4.10.0090.01812.30
5.4.00.0050.02212.01
5.3.290.0080.02012.84
5.3.280.0070.02112.73
5.3.270.0070.02312.95
5.3.260.0080.02312.91
5.3.250.0070.02012.90
5.3.240.0060.02112.76
5.3.230.0080.02012.91
5.3.220.0080.01912.80
5.3.210.0050.02312.82
5.3.200.0090.01812.74
5.3.190.0080.02312.82
5.3.180.0060.02312.88
5.3.170.0060.02012.74
5.3.160.0040.02512.88
5.3.150.0040.02312.77
5.3.140.0070.02112.74
5.3.130.0070.02012.85
5.3.120.0060.02212.74
5.3.110.0020.02512.87
5.3.100.0080.01812.55
5.3.90.0020.02312.45
5.3.80.0050.02212.49
5.3.70.0040.02312.46
5.3.60.0070.02112.53
5.3.50.0080.02012.41
5.3.40.0090.01812.38
5.3.30.0060.02012.48
5.3.20.0060.01912.28
5.3.10.0040.02112.27
5.3.00.0020.02412.14
5.2.170.0060.01510.55
5.2.160.0050.01710.44
5.2.150.0040.02110.54
5.2.140.0050.01610.53
5.2.130.0060.01510.41
5.2.120.0050.01510.52
5.2.110.0060.01510.43
5.2.100.0020.01910.52
5.2.90.0020.01910.39
5.2.80.0050.02010.38
5.2.70.0050.01810.47
5.2.60.0040.01810.38
5.2.50.0040.01710.37
5.2.40.0060.01510.34
5.2.30.0070.01410.29
5.2.20.0060.01510.33
5.2.10.0040.01610.26
5.2.00.0050.01510.03
5.1.60.0050.0139.45
5.1.50.0040.0169.37
5.1.40.0050.0169.43
5.1.30.0060.0189.76
5.1.20.0080.0119.60
5.1.10.0070.0129.44
5.1.00.0060.0159.38
5.0.50.0040.0158.57
5.0.40.0060.0138.50
5.0.30.0060.0158.41
5.0.20.0050.0108.39
5.0.10.0010.0148.38
5.0.00.0030.0178.38
4.4.90.0040.0107.63
4.4.80.0020.0097.63
4.4.70.0040.0077.62
4.4.60.0030.0077.63
4.4.50.0010.0107.63
4.4.40.0040.0147.60
4.4.30.0040.0097.63
4.4.20.0040.0077.67
4.4.10.0030.0107.67
4.4.00.0020.0147.63
4.3.110.0010.0097.58
4.3.100.0020.0097.58
4.3.90.0020.0087.56
4.3.80.0030.0137.54
4.3.70.0030.0077.56
4.3.60.0030.0077.56
4.3.50.0040.0077.56
4.3.40.0040.0137.51
4.3.30.0020.0086.90
4.3.20.0010.0126.89
4.3.10.0010.0126.86
4.3.00.0000.01114.53

preferences:
112.35 ms | 401 KiB | 5 Q