3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('gravatar')) { function gravatar($user_id = false, $secure = false, $force = false) { // $CI =& get_instance(); $endpoint = 'http://gravatar.com/'; $secure_endpoint = 'https://secure.gravatar.com/'; $fallback = 'http://www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&f=y'; $params = array( 's' => '250', // size 'd' => urlencode($fallback), // default (fallback) ); if (!$force) { if (!$user_id) { return $fallback; } } else { $params['f'] = 'y'; } // $email = $CI->members_model->gravatarEmail($user_id); $email = md5('test@example.com'); return ($secure ? $secure_endpoint : $endpoint) . 'avatar/' . $email . '?' . http_build_query($params); } } echo gravatar(12345, true, false);

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.0140.00718.56
8.3.50.0110.00622.18
8.3.40.0080.00818.67
8.3.30.0120.00618.41
8.3.20.0080.00018.63
8.3.10.0050.00321.22
8.3.00.0060.00323.27
8.2.180.0000.01816.38
8.2.170.0170.00322.96
8.2.160.0070.00720.50
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0150.00026.16
8.2.120.0040.00419.89
8.2.110.0070.00320.26
8.2.100.0090.00317.78
8.2.90.0040.00419.21
8.2.80.0070.00017.97
8.2.70.0050.00317.75
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0000.00721.23
8.2.20.0040.00417.84
8.2.10.0040.00417.82
8.2.00.0030.00717.76
8.1.280.0090.00925.92
8.1.270.0080.00023.99
8.1.260.0070.00726.35
8.1.250.0000.00728.09
8.1.240.0030.00623.92
8.1.230.0040.01120.99
8.1.220.0040.00418.77
8.1.210.0060.00318.93
8.1.200.0040.00417.35
8.1.190.0000.00817.40
8.1.180.0060.00318.10
8.1.170.0040.00418.53
8.1.160.0070.00018.85
8.1.150.0040.00418.65
8.1.140.0000.00717.46
8.1.130.0030.00317.88
8.1.120.0030.00717.48
8.1.110.0050.00517.44
8.1.100.0030.00517.43
8.1.90.0030.00517.39
8.1.80.0070.00017.47
8.1.70.0030.00317.45
8.1.60.0040.00417.57
8.1.50.0020.00517.55
8.1.40.0000.00817.53
8.1.30.0040.00417.68
8.1.20.0030.00617.55
8.1.10.0080.00017.58
8.1.00.0060.00517.51
8.0.300.0000.00719.96
8.0.290.0040.00417.18
8.0.280.0040.00418.46
8.0.270.0000.00717.23
8.0.260.0030.00316.89
8.0.250.0000.00817.00
8.0.240.0060.00316.93
8.0.230.0000.00717.06
8.0.220.0030.00316.88
8.0.210.0030.00316.86
8.0.200.0030.00316.95
8.0.190.0070.00016.99
8.0.180.0070.00016.93
8.0.170.0030.00516.95
8.0.160.0000.00716.74
8.0.150.0030.00616.76
8.0.140.0070.00016.87
8.0.130.0020.00613.34
8.0.120.0040.00416.82
8.0.110.0040.00416.95
8.0.100.0040.00416.80
8.0.90.0000.00816.89
8.0.80.0120.00916.93
8.0.70.0070.00016.75
8.0.60.0000.00716.70
8.0.50.0000.00716.81
8.0.30.0110.01317.19
8.0.20.0120.00717.40
8.0.10.0030.00617.06
8.0.00.0120.00816.82
7.4.330.0000.00514.65
7.4.320.0030.00316.54
7.4.300.0030.00316.57
7.4.290.0040.00416.62
7.4.280.0060.00016.61
7.4.270.0070.00016.38
7.4.260.0000.00513.41
7.4.250.0100.00016.48
7.4.240.0030.00316.58
7.4.230.0050.00316.47
7.4.220.0120.01116.50
7.4.210.0090.00716.55
7.4.200.0000.00716.51
7.4.190.0070.00016.56
7.4.160.0090.00916.42
7.4.150.0100.00717.40
7.4.140.0070.01317.86
7.4.130.0110.00716.54
7.4.120.0090.00916.54
7.4.110.0100.00716.60
7.4.100.0090.00916.50
7.4.90.0100.01016.61
7.4.80.0100.00719.39
7.4.70.0070.01016.68
7.4.60.0000.01916.60
7.4.50.0040.00416.22
7.4.40.0060.00922.52
7.4.30.0120.01216.74
7.4.10.0140.00315.09
7.4.00.0080.01014.90
7.3.330.0000.00513.40
7.3.320.0050.00013.38
7.3.310.0070.00016.23
7.3.300.0030.00316.42
7.3.290.0100.01016.36
7.3.280.0080.00916.35
7.3.270.0080.00917.40
7.3.260.0110.00818.24
7.3.250.0110.00716.51
7.3.240.0070.01116.32
7.3.230.0100.00716.62
7.3.210.0080.00816.27
7.3.200.0140.00719.39
7.3.190.0030.01316.52
7.3.180.0030.01316.60
7.3.170.0070.01016.39
7.3.160.0130.00316.64
7.3.130.0070.01114.65
7.3.120.0080.00815.08
7.3.110.0070.01114.79
7.3.100.0110.00314.79
7.3.90.0090.00614.51
7.3.80.0030.00614.64
7.3.70.0070.00714.84
7.3.60.0060.00915.09
7.3.50.0030.00614.69
7.3.40.0040.00814.92
7.3.30.0160.00014.81
7.3.20.0060.00316.48
7.3.10.0100.00716.39
7.3.00.0080.00516.60
7.2.330.0000.01716.71
7.2.320.0050.01516.77
7.2.310.0070.01016.33
7.2.300.0100.00716.75
7.2.290.0130.00316.88
7.2.260.0060.00914.57
7.2.250.0030.01615.26
7.2.240.0100.00715.19
7.2.230.0060.00914.94
7.2.220.0090.00614.79
7.2.210.0030.01215.01
7.2.200.0040.00815.12
7.2.190.0030.01314.79
7.2.180.0060.00915.00
7.2.170.0040.00715.10
7.2.160.0090.00014.94
7.2.150.0040.00816.86
7.2.140.0070.00716.74
7.2.130.0110.00816.85
7.2.120.0060.00816.74
7.2.110.0030.01016.70
7.2.100.0070.00916.68
7.2.90.0060.00917.07
7.2.80.0130.00616.65
7.2.70.0130.00716.46
7.2.60.0060.01116.80
7.2.50.0090.00516.66
7.2.40.0060.00816.42
7.2.30.0140.00316.74
7.2.20.0130.00316.45
7.2.10.0080.00817.08
7.2.00.0100.00816.90
7.1.330.0070.00715.81
7.1.320.0070.01115.91
7.1.310.0000.01315.71
7.1.300.0000.01215.77
7.1.290.0030.00515.84
7.1.280.0060.00615.49
7.1.270.0030.01315.84
7.1.260.0050.00315.95
7.1.250.0050.00815.70
7.1.240.0080.00415.84
7.1.230.0090.00615.78
7.1.220.0040.00815.71
7.1.210.0050.00515.66
7.1.200.0030.00715.91
7.1.190.0090.00615.63
7.1.180.0070.01015.93
7.1.170.0030.00715.80
7.1.160.0060.00815.55
7.1.150.0040.00415.76
7.1.140.0030.01016.00
7.1.130.0060.00915.53
7.1.120.0100.00315.85
7.1.110.0080.00015.73
7.1.100.0070.00617.03
7.1.90.0170.00015.98
7.1.80.0030.00915.84
7.1.70.0040.00716.48
7.1.60.0050.00916.55
7.1.50.0090.01016.42
7.1.40.0070.00715.97
7.1.30.0070.00315.79
7.1.20.0030.01015.87
7.1.10.0030.01515.80
7.1.00.0060.04018.99
7.0.330.0000.01215.34
7.0.320.0000.01415.46
7.0.310.0060.00615.49
7.0.300.0000.01215.36
7.0.290.0050.00815.39
7.0.280.0030.00715.07
7.0.270.0060.00615.07
7.0.260.0070.01115.59
7.0.250.0060.00315.38
7.0.240.0060.01015.39
7.0.230.0070.00715.56
7.0.220.0080.00815.37
7.0.210.0070.00315.09
7.0.200.0080.00316.05
7.0.190.0040.01115.38
7.0.180.0110.00015.61
7.0.170.0080.00315.46
7.0.160.0060.00615.61
7.0.150.0070.00715.55
7.0.140.0060.03818.84
7.0.130.0030.00615.57
7.0.120.0100.00315.45
7.0.110.0000.01115.17
7.0.100.0040.01215.46
7.0.90.0100.00715.47
7.0.80.0080.02017.52
7.0.70.0070.03117.78
7.0.60.0050.02817.66
7.0.50.0080.01817.83
7.0.40.0050.02016.83
7.0.30.0020.04516.64
7.0.20.0080.01816.73
7.0.10.0060.02016.83
7.0.00.0050.02316.64
5.6.400.0040.00414.24
5.6.390.0030.00914.57
5.6.380.0090.00314.36
5.6.370.0040.01114.12
5.6.360.0090.00614.35
5.6.350.0030.01014.53
5.6.340.0060.00914.51
5.6.330.0070.00714.22
5.6.320.0030.00614.34
5.6.310.0050.00514.57
5.6.300.0090.00614.46
5.6.290.0090.00914.48
5.6.280.0100.03517.71
5.6.270.0100.00314.45
5.6.260.0060.00914.31
5.6.250.0070.01014.45
5.6.240.0100.00314.59
5.6.230.0070.04017.52
5.6.220.0110.03617.66
5.6.210.0070.02417.49
5.6.200.0060.03517.56
5.6.190.0050.04217.56
5.6.180.0030.03917.69
5.6.170.0060.02117.72
5.6.160.0100.03417.70
5.6.150.0080.02117.64
5.6.140.0070.04617.83
5.6.130.0090.04717.63
5.6.120.0020.04417.51
5.6.110.0070.02217.63
5.6.100.0060.04317.64
5.6.90.0090.02817.59
5.6.80.0030.04517.34
5.6.70.0000.02717.35
5.6.60.0070.03317.48
5.6.50.0020.03717.28
5.6.40.0030.02317.28
5.6.30.0070.02217.29
5.6.20.0030.02817.39
5.6.10.0090.03817.45
5.6.00.0070.03517.31
5.5.380.0060.00614.23
5.5.370.0070.04217.49
5.5.360.0050.02617.34
5.5.350.0050.02717.47
5.5.340.0070.02417.62
5.5.330.0020.02517.62
5.5.320.0020.05017.69
5.5.310.0030.03617.38
5.5.300.0050.02017.72
5.5.290.0040.03117.56
5.5.280.0050.04217.53
5.5.270.0110.03817.74
5.5.260.0030.02417.68
5.5.250.0050.04717.43
5.5.240.0050.03717.33
5.5.230.0070.04316.97
5.5.220.0030.03817.14
5.5.210.0060.03717.02
5.5.200.0030.02517.42
5.5.190.0050.03817.24
5.5.180.0030.04617.02
5.5.170.0030.01014.12
5.5.160.0080.04317.29
5.5.150.0020.02717.28
5.5.140.0100.03917.28
5.5.130.0020.04517.23
5.5.120.0070.04417.39
5.5.110.0070.02617.22
5.5.100.0070.04117.13
5.5.90.0030.03817.25
5.5.80.0070.03817.17
5.5.70.0050.04317.22
5.5.60.0090.03717.24
5.5.50.0050.03617.13
5.5.40.0060.03117.16
5.5.30.0080.03617.20
5.5.20.0080.04317.22
5.5.10.0070.03017.11
5.5.00.0050.03517.01
5.4.450.0020.02315.84
5.4.440.0050.02315.71
5.4.430.0020.02015.86
5.4.420.0080.03715.86
5.4.410.0020.04415.78
5.4.400.0050.02615.74
5.4.390.0050.03315.66
5.4.380.0080.02415.56
5.4.370.0050.02415.71
5.4.360.0030.02315.70
5.4.350.0030.04015.71
5.4.340.0040.04515.68
5.4.330.0040.00712.24
5.4.320.0000.03815.60
5.4.310.0070.03915.54
5.4.300.0050.02315.62
5.4.290.0030.02015.64
5.4.280.0020.04115.68
5.4.270.0030.04215.55
5.4.260.0050.04215.68
5.4.250.0070.02815.55
5.4.240.0030.02115.73
5.4.230.0080.02815.71
5.4.220.0060.04115.59
5.4.210.0050.03515.64
5.4.200.0080.03115.72
5.4.190.0100.03815.67
5.4.180.0100.03515.63
5.4.170.0030.02215.72
5.4.160.0030.02715.71
5.4.150.0080.02915.67
5.4.140.0060.02814.29
5.4.130.0110.03314.21
5.4.120.0030.03214.32
5.4.110.0070.04014.31
5.4.100.0040.04014.37
5.4.90.0040.03914.30
5.4.80.0100.03314.33
5.4.70.0070.03514.31
5.4.60.0020.02314.36
5.4.50.0030.02314.24
5.4.40.0050.03014.37
5.4.30.0050.01814.32
5.4.20.0020.04114.36
5.4.10.0000.02314.36
5.4.00.0070.03514.06
5.3.290.0050.03613.45
5.3.280.0020.03413.40
5.3.270.0100.02313.43
5.3.260.0040.04213.40
5.3.250.0030.03813.45
5.3.240.0060.03613.40
5.3.230.0050.04513.38
5.3.220.0060.02013.37
5.3.210.0040.04513.36
5.3.200.0050.02513.41
5.3.190.0020.04313.47
5.3.180.0070.04013.41
5.3.170.0090.03613.46
5.3.160.0030.04313.36
5.3.150.0010.02613.41
5.3.140.0030.03413.37
5.3.130.0070.03413.40
5.3.120.0020.02613.36
5.3.110.0070.02113.35
5.3.100.0080.03513.15
5.3.90.0000.02513.12
5.3.80.0050.03813.19
5.3.70.0010.03713.15
5.3.60.0070.02013.11
5.3.50.0050.03913.11
5.3.40.0050.02713.08
5.3.30.0020.02013.02
5.3.20.0020.02212.95
5.3.10.0050.03312.91
5.3.00.0030.03213.01
5.2.170.0030.03312.46
5.2.160.0130.05312.46
5.2.150.0000.03312.46
5.2.140.0030.06312.46
5.2.130.0000.03012.46
5.2.120.0000.06312.46
5.2.110.0100.05312.46
5.2.100.0100.04712.46
5.2.90.0030.06312.46
5.2.80.0000.04312.46
5.2.70.0030.06012.46
5.2.60.0000.03012.46
5.2.50.0030.05712.46
5.2.40.0030.03312.46
5.2.30.0070.05712.46
5.2.20.0000.03312.46
5.2.10.0030.02312.46
5.2.00.0100.04012.46
5.1.60.0030.05312.46
5.1.50.0000.05312.46
5.1.40.0030.05312.46
5.1.30.0130.04312.46
5.1.20.0030.03712.46
5.1.10.0000.02312.46
5.1.00.0000.05012.46
5.0.50.0000.03012.46
5.0.40.0070.04012.46
5.0.30.0000.05012.46
5.0.20.0100.02012.46
5.0.10.0000.02712.46
5.0.00.0000.03312.46
4.4.90.0000.03712.46
4.4.80.0000.01312.46
4.4.70.0100.01012.46
4.4.60.0000.03712.46
4.4.50.0000.02312.46
4.4.40.0030.03312.46
4.4.30.0000.01312.46
4.4.20.0000.01312.46
4.4.10.0070.02712.46
4.4.00.0000.05712.46
4.3.110.0070.03312.46
4.3.100.0030.01712.46
4.3.90.0000.02012.46
4.3.80.0000.02712.46
4.3.70.0000.03712.46
4.3.60.0000.02712.46
4.3.50.0030.02312.46
4.3.40.0030.04312.46
4.3.30.0000.02012.46
4.3.20.0000.04012.46
4.3.10.0000.01712.46
4.3.00.0000.01312.46

preferences:
39.18 ms | 401 KiB | 5 Q