3v4l.org

run code in 300+ PHP versions simultaneously
<?php mt_srand(42); for ($i = 0; $i < 20; $i++) { echo generate_key() . "\n"; } function generate_key() { return base64_urlencode(rand_buffer(48)); } function base64_urlencode($buf) { return str_replace(array('+', '/', '='), array('-', '_', ''), base64_encode($buf)); } function rand_buffer($n) { $buf = ""; for ($i = 0; $i < $n; $i++) { $buf .= chr(mt_rand(0, 255)); } return $buf; }

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)
7.4.10.0120.00614.89
7.4.00.0120.00614.89
7.3.130.0030.01315.11
7.3.120.0070.01114.91
7.3.110.0060.00914.68
7.3.100.0060.00914.53
7.3.90.0030.01314.82
7.3.80.0040.00414.65
7.3.70.0040.01114.76
7.3.60.0030.00914.72
7.3.50.0040.01214.93
7.3.40.0090.00614.89
7.3.30.0060.00314.81
7.3.20.0060.00616.79
7.3.10.0040.01216.86
7.3.00.0110.00416.79
7.2.260.0070.01415.11
7.2.250.0030.01215.30
7.2.240.0040.01115.00
7.2.230.0070.01115.16
7.2.220.0000.02115.21
7.2.210.0060.00614.96
7.2.200.0030.01215.34
7.2.190.0070.00315.04
7.2.180.0030.00915.07
7.2.170.0000.01215.12
7.2.160.0050.00514.73
7.2.150.0150.00317.01
7.2.140.0030.00716.77
7.2.130.0040.01116.78
7.2.120.0030.01017.14
7.2.110.0070.00716.65
7.2.100.0000.01617.05
7.2.90.0040.01116.75
7.2.80.0090.00617.00
7.2.70.0060.00917.11
7.2.60.0000.01816.79
7.2.50.0000.01017.04
7.2.40.0000.01416.84
7.2.30.0030.01316.85
7.2.20.0040.00716.81
7.2.10.0090.00617.02
7.2.00.0030.00818.19
7.1.330.0090.00615.72
7.1.320.0060.01015.93
7.1.310.0040.01115.64
7.1.300.0040.01115.63
7.1.290.0120.00315.67
7.1.280.0030.01015.75
7.1.270.0070.00315.73
7.1.260.0030.00615.90
7.1.250.0070.00715.84
7.1.240.0100.00316.03
7.1.230.0040.00415.80
7.1.220.0000.01515.85
7.1.210.0160.00315.59
7.1.200.0030.01015.91
7.1.190.0090.00615.83
7.1.180.0000.01415.91
7.1.170.0030.01015.80
7.1.160.0030.01015.77
7.1.150.0070.00715.79
7.1.140.0150.00015.46
7.1.130.0060.00615.79
7.1.120.0060.00315.96
7.1.110.0060.00915.79
7.1.100.0060.00815.70
7.1.90.0030.00615.93
7.1.80.0110.00615.87
7.1.70.0050.00716.37
7.1.60.0090.00917.72
7.1.50.0080.00816.46
7.1.40.0090.00615.77
7.1.30.0000.01515.92
7.1.20.0060.01015.82
7.1.10.0040.00415.72
7.1.00.0070.03718.96
7.0.330.0060.00915.50
7.0.320.0000.00915.57
7.0.310.0000.00915.12
7.0.300.0090.00315.48
7.0.290.0000.01415.23
7.0.280.0120.00615.30
7.0.270.0060.00315.46
7.0.260.0030.01015.64
7.0.250.0040.01115.44
7.0.240.0070.00715.45
7.0.230.0090.00615.59
7.0.220.0090.00615.42
7.0.210.0070.00715.59
7.0.200.0010.01016.19
7.0.190.0110.00415.32
7.0.180.0030.01515.57
7.0.170.0060.01215.42
7.0.160.0030.01215.44
7.0.150.0000.01415.49
7.0.140.0080.03318.82
7.0.130.0000.00815.39
7.0.120.0120.02318.81
7.0.110.0070.03918.77
7.0.100.0020.02718.72
7.0.90.0030.02718.73
7.0.80.0140.01918.79
7.0.70.0050.02218.70
7.0.60.0030.02518.65
7.0.50.0060.02418.78
7.0.40.0030.02816.85
7.0.30.0050.03916.68
7.0.20.0000.04516.77
7.0.10.0030.03516.67
7.0.00.0060.04216.84
5.6.400.0030.01014.59
5.6.390.0000.01814.46
5.6.380.0100.00914.57
5.6.370.0060.00614.26
5.6.360.0060.00814.25
5.6.350.0100.00714.31
5.6.340.0090.00614.43
5.6.330.0070.01014.65
5.6.320.0140.00014.61
5.6.310.0030.00914.73
5.6.300.0100.00714.71
5.6.290.0040.01114.43
5.6.280.0080.03817.56
5.6.270.0120.02217.70
5.6.260.0050.02317.62
5.6.250.0050.02617.80
5.6.240.0050.03317.80
5.6.230.0120.01517.71
5.6.220.0030.02717.60
5.6.210.0030.02617.56
5.6.200.0110.02017.54
5.6.190.0030.04617.60
5.6.180.0090.04217.64
5.6.170.0070.03317.56
5.6.160.0050.04417.64
5.6.150.0050.03217.71
5.6.140.0050.03617.57
5.6.130.0050.02517.63
5.6.120.0090.02317.80
5.6.110.0020.03917.63
5.6.100.0030.03017.69
5.6.90.0080.03217.60
5.6.80.0060.05017.33
5.6.70.0020.02717.30
5.6.60.0050.02817.24
5.6.50.0020.03617.23
5.6.40.0040.02517.21
5.6.30.0070.04317.29
5.6.20.0060.03617.33
5.6.10.0040.02217.36
5.6.00.0040.03617.20
5.5.380.0090.01915.87
5.5.370.0030.03015.97
5.5.360.0020.02716.02
5.5.350.0050.02315.95
5.5.340.0000.02616.31
5.5.330.0050.02516.14
5.5.320.0030.04016.19
5.5.310.0050.03816.09
5.5.300.0000.04316.01
5.5.290.0070.03416.39
5.5.280.0050.03816.25
5.5.270.0030.02316.05
5.5.260.0070.04016.27
5.5.250.0000.03816.14
5.5.240.0030.03516.03
5.5.230.0050.03315.88
5.5.220.0020.04315.86
5.5.210.0070.01715.82
5.5.200.0070.02215.97
5.5.190.0030.02615.82
5.5.180.0020.03916.04
5.5.170.0060.00314.25
5.5.160.0060.02515.67
5.5.150.0020.04315.92
5.5.140.0080.02915.86
5.5.130.0020.02415.76
5.5.120.0080.02015.69
5.5.110.0060.02415.74
5.5.100.0030.02315.82
5.5.90.0000.02415.85
5.5.80.0040.02415.75
5.5.70.0070.01815.98
5.5.60.0050.02115.61
5.5.50.0020.02515.82
5.5.40.0050.01815.76
5.5.30.0020.04715.91
5.5.20.0070.03315.69
5.5.10.0060.01915.57
5.5.00.0030.02215.84
5.4.450.0070.03815.64
5.4.440.0030.04315.81
5.4.430.0080.03515.64
5.4.420.0060.02615.81
5.4.410.0100.02815.70
5.4.400.0030.03315.47
5.4.390.0080.03815.49
5.4.380.0040.04215.55
5.4.370.0050.01815.47
5.4.360.0010.02415.57
5.4.350.0050.02315.47
5.4.340.0050.02315.63
5.4.330.0050.00312.01
5.4.320.0060.02115.48
5.4.310.0050.03815.60
5.4.300.0020.02315.56
5.4.290.0050.04115.45
5.4.280.0010.02215.45
5.4.270.0030.02115.47
5.4.260.0030.02215.55
5.4.250.0000.02815.59
5.4.240.0030.02115.47
5.4.230.0050.02115.45
5.4.220.0050.02215.47
5.4.210.0020.02315.47
5.4.200.0040.01915.56
5.4.190.0020.03515.56
5.4.180.0050.02515.45
5.4.170.0030.01915.56
5.4.160.0050.02315.48
5.4.150.0030.02615.62
5.4.140.0030.02514.28
5.4.130.0040.01714.16
5.4.120.0020.02614.30
5.4.110.0040.02814.16
5.4.100.0040.02014.18
5.4.90.0060.03814.21
5.4.80.0020.02414.27
5.4.70.0040.02214.25
5.4.60.0020.02014.14
5.4.50.0030.02514.25
5.4.40.0050.04114.20
5.4.30.0030.03114.22
5.4.20.0030.02514.20
5.4.10.0050.02314.26
5.4.00.0040.03013.95
5.3.290.0060.04213.38
5.3.280.0010.01913.35
5.3.270.0050.02213.31
5.3.260.0050.04013.30
5.3.250.0020.03013.31
5.3.240.0030.03813.32
5.3.230.0020.02213.38
5.3.220.0100.01513.29
5.3.210.0000.02513.30
5.3.200.0030.02313.33
5.3.190.0070.02013.30
5.3.180.0020.02213.30
5.3.170.0030.02113.29
5.3.160.0020.04413.36
5.3.150.0050.01713.29
5.3.140.0030.01713.21
5.3.130.0050.02213.27
5.3.120.0030.02713.28
5.3.110.0090.02213.35
5.3.100.0050.01813.10
5.3.90.0070.02013.13
5.3.80.0020.02112.95
5.3.70.0020.02213.02
5.3.60.0050.01913.00
5.3.50.0050.02012.97
5.3.40.0020.02413.10
5.3.30.0060.01812.98
5.3.20.0020.02912.97
5.3.10.0020.02312.91
5.3.00.0030.02212.83
5.2.170.0070.02711.15
5.2.160.0000.03311.28
5.2.150.0070.02711.00
5.2.140.0000.03311.14
5.2.130.0070.02711.19
5.2.120.0000.02711.19
5.2.110.0070.04711.13
5.2.100.0000.03011.11
5.2.90.0070.04711.13
5.2.80.0030.03011.11
5.2.70.0000.03011.23
5.2.60.0030.05011.14
5.2.50.0030.05711.04
5.2.40.0030.05311.01
5.2.30.0000.04311.07
5.2.20.0000.05010.96
5.2.10.0070.05011.00
5.2.00.0030.02710.74
5.1.60.0030.0479.99
5.1.50.0070.04310.07
5.1.40.0070.04710.15
5.1.30.0030.05010.43
5.1.20.0070.05010.41
5.1.10.0030.04710.08
5.1.00.0030.02710.05
5.0.50.0030.0479.74
5.0.40.0000.0209.74
5.0.30.0000.0279.74
5.0.20.0000.0379.74
5.0.10.0030.0439.74
5.0.00.0030.0609.74
4.4.90.0000.0239.74
4.4.80.0070.0239.74
4.4.70.0030.0339.74
4.4.60.0000.0279.74
4.4.50.0000.0179.74
4.4.40.0000.0579.74
4.4.30.0030.0309.74
4.4.20.0000.0179.74
4.4.10.0000.0339.74
4.4.00.0030.0209.74
4.3.110.0000.0139.74
4.3.100.0030.0309.74
4.3.90.0000.0139.74
4.3.80.0070.0479.74
4.3.70.0000.0309.74
4.3.60.0000.0239.74
4.3.50.0000.0309.74
4.3.40.0000.0209.74
4.3.30.0030.0339.74
4.3.20.0030.0239.74
4.3.10.0030.0379.74
4.3.00.0000.0309.74

preferences:
40.8 ms | 401 KiB | 5 Q