3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Force an all-numeric uniqid (happens at certain system clock values) $my_key = uniqid("\x00"); $my_key = preg_replace('/[a-zA-Z]/', "4", $my_key); $my_key .= "a"; $var[$my_key] = TRUE; foreach($var as $key => $val) { if ($key === $my_key) { echo 'You got it right'; } else { echo 'You got it wrong'; } }

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.0170.00315.00
7.4.00.0000.02215.08
7.3.130.0060.01015.17
7.3.120.0140.00315.02
7.3.110.0060.00915.04
7.3.100.0060.00915.25
7.3.90.0000.01415.00
7.3.80.0070.00714.91
7.3.70.0000.01315.00
7.3.60.0090.00315.09
7.3.50.0070.01014.81
7.3.40.0000.00915.09
7.3.30.0140.00314.80
7.3.20.0070.00716.79
7.3.10.0050.00516.89
7.3.00.0030.00616.72
7.2.260.0090.00915.25
7.2.250.0140.00415.16
7.2.240.0120.00315.09
7.2.230.0000.01715.22
7.2.220.0070.01015.04
7.2.210.0120.00315.07
7.2.200.0040.01115.32
7.2.190.0120.00415.24
7.2.180.0110.00715.06
7.2.170.0070.00715.16
7.2.160.0060.00315.09
7.2.150.0040.01117.17
7.2.140.0100.00717.25
7.2.130.0060.00917.30
7.2.120.0060.00616.95
7.2.110.0070.01116.92
7.2.100.0060.00617.10
7.2.90.0060.01017.15
7.2.80.0130.00316.95
7.2.70.0000.00917.02
7.2.60.0030.01216.99
7.2.50.0090.00617.04
7.2.40.0090.00316.99
7.2.30.0040.01217.15
7.2.20.0070.00717.20
7.2.10.0140.00017.00
7.2.00.0070.01017.10
7.1.330.0060.00615.84
7.1.320.0030.01315.68
7.1.310.0030.01316.01
7.1.300.0040.01115.76
7.1.290.0060.00315.95
7.1.280.0060.00816.04
7.1.270.0110.00416.04
7.1.260.0040.00715.94
7.1.250.0000.01415.75
7.1.240.0120.00615.96
7.1.230.0030.01316.05
7.1.220.0080.00016.18
7.1.210.0000.01415.98
7.1.200.0060.00616.05
7.1.190.0000.01216.02
7.1.180.0070.00715.78
7.1.170.0000.01416.05
7.1.160.0090.00016.04
7.1.150.0070.00715.62
7.1.140.0080.00416.20
7.1.130.0050.00815.73
7.1.120.0070.00716.16
7.1.110.0030.00515.90
7.1.100.0070.00716.18
7.1.90.0060.00616.04
7.1.80.0000.01316.04
7.1.70.0020.00816.77
7.1.60.0070.01017.85
7.1.50.0120.00616.51
7.1.40.0100.00015.98
7.1.30.0030.01016.15
7.1.20.0060.00615.95
7.1.10.0070.00915.86
7.1.00.0030.04219.26
7.0.330.0060.00915.47
7.0.320.0090.00315.43
7.0.310.0060.00615.60
7.0.300.0040.00415.67
7.0.290.0070.00415.73
7.0.280.0060.00615.34
7.0.270.0070.00715.67
7.0.260.0000.00915.46
7.0.250.0070.00315.48
7.0.240.0000.01315.73
7.0.230.0070.00315.64
7.0.220.0070.00315.67
7.0.210.0070.00715.39
7.0.200.0040.00716.25
7.0.190.0030.01015.79
7.0.180.0040.01115.57
7.0.170.0030.00615.70
7.0.160.0040.01115.58
7.0.150.0040.01115.61
7.0.140.0040.03918.79
7.0.130.0060.00615.56
7.0.120.0070.00715.48
7.0.110.0110.03317.78
7.0.100.0110.03717.80
7.0.90.0040.02517.86
7.0.80.0090.02417.84
7.0.70.0030.02617.66
7.0.60.0050.02317.86
7.0.50.0070.02217.88
7.0.40.0040.04416.74
7.0.30.0030.04916.86
7.0.20.0100.04216.66
7.0.10.0030.02816.80
7.0.00.0050.01916.68
5.6.400.0030.00714.70
5.6.390.0110.00714.60
5.6.380.0040.00814.55
5.6.370.0070.00714.75
5.6.360.0030.00614.39
5.6.350.0070.00714.93
5.6.340.0080.00614.50
5.6.330.0030.00714.84
5.6.320.0000.00814.54
5.6.310.0000.00914.57
5.6.300.0000.01014.61
5.6.290.0050.00514.72
5.6.280.0000.01214.30
5.6.270.0030.00614.77
5.6.260.0100.03717.74
5.6.250.0100.03517.66
5.6.240.0160.01817.69
5.6.230.0070.02417.56
5.6.220.0110.02117.62
5.6.210.0030.02217.59
5.6.200.0050.02717.39
5.6.190.0050.02817.53
5.6.180.0050.02517.63
5.6.170.0050.03817.65
5.6.160.0030.02317.58
5.6.150.0040.02717.61
5.6.140.0050.02017.54
5.6.130.0080.02217.62
5.6.120.0100.03717.68
5.6.110.0030.02517.43
5.6.100.0040.02417.56
5.6.90.0050.02317.62
5.6.80.0050.02217.11
5.6.70.0030.02617.17
5.6.60.0020.02817.19
5.6.50.0070.03217.06
5.6.40.0050.02517.12
5.6.30.0050.02317.14
5.6.20.0030.02917.05
5.6.10.0050.03717.06
5.6.00.0000.02816.96
5.5.380.0070.02316.03
5.5.370.0050.02415.98
5.5.360.0020.02916.05
5.5.350.0050.03116.20
5.5.340.0090.03416.24
5.5.330.0000.04716.16
5.5.320.0060.04016.05
5.5.310.0080.02716.21
5.5.300.0050.03216.27
5.5.290.0050.02516.05
5.5.280.0020.03116.12
5.5.270.0030.02916.24
5.5.260.0070.02016.20
5.5.250.0100.02016.10
5.5.240.0080.02016.11
5.5.230.0080.03215.84
5.5.220.0060.02015.93
5.5.210.0030.04515.84
5.5.200.0080.02115.82
5.5.190.0030.02516.01
5.5.180.0080.03015.75
5.5.170.0090.00614.35
5.5.160.0050.03215.83
5.5.150.0110.03015.99
5.5.140.0040.03115.69
5.5.130.0050.02415.77
5.5.120.0070.02215.93
5.5.110.0030.04015.96
5.5.100.0100.03915.83
5.5.90.0050.02815.96
5.5.80.0080.04015.79
5.5.70.0080.04015.71
5.5.60.0100.03715.88
5.5.50.0120.02715.54
5.5.40.0040.03615.59
5.5.30.0070.04015.88
5.5.20.0020.04815.83
5.5.10.0080.03715.77
5.5.00.0080.04215.50
5.4.450.0050.02216.29
5.4.440.0070.01816.23
5.4.430.0030.02816.20
5.4.420.0030.02416.21
5.4.410.0080.02316.17
5.4.400.0060.03315.96
5.4.390.0050.02216.12
5.4.380.0070.02016.07
5.4.370.0030.02215.99
5.4.360.0030.02415.99
5.4.350.0020.02416.04
5.4.340.0030.02016.13
5.4.330.0030.00712.97
5.4.320.0030.02516.12
5.4.310.0050.02015.95
5.4.300.0070.02016.02
5.4.290.0040.02915.96
5.4.280.0020.04116.00
5.4.270.0020.04115.96
5.4.260.0070.03715.97
5.4.250.0070.03815.98
5.4.240.0050.04016.03
5.4.230.0050.04215.99
5.4.220.0060.04315.96
5.4.210.0040.04616.13
5.4.200.0100.03616.11
5.4.190.0100.03716.03
5.4.180.0050.04216.06
5.4.170.0050.03816.03
5.4.160.0020.03815.99
5.4.150.0060.04115.96
5.4.140.0050.03614.73
5.4.130.0070.03914.59
5.4.120.0050.04014.69
5.4.110.0050.04314.58
5.4.100.0070.03514.72
5.4.90.0100.02814.63
5.4.80.0090.03514.62
5.4.70.0080.03714.59
5.4.60.0080.03514.59
5.4.50.0080.03714.72
5.4.40.0080.03314.64
5.4.30.0030.04114.73
5.4.20.0050.03414.59
5.4.10.0020.02614.70
5.4.00.0030.03814.49
5.3.290.0030.03314.56
5.3.280.0070.08014.61
5.3.270.0070.08014.48
5.3.260.0030.07014.39
5.3.250.0030.08014.63
5.3.240.0070.07714.60
5.3.230.0070.07014.48
5.3.220.0130.06014.58
5.3.210.0070.07314.46
5.3.200.0100.07014.39
5.3.190.0070.06714.56
5.3.180.0100.06714.50
5.3.170.0100.06014.51
5.3.160.0130.06314.66
5.3.150.0030.07314.64
5.3.140.0030.04314.61
5.3.130.0030.04014.55
5.3.120.0100.04314.43
5.3.110.0070.06314.57
5.3.100.0000.07713.82
5.3.90.0030.07713.96
5.3.80.0000.05013.94
5.3.70.0100.07013.94
5.3.60.0030.07714.09
5.3.50.0070.06713.82
5.3.40.0130.06714.04
5.3.30.0070.07313.85
5.3.20.0000.06713.62
5.3.10.0100.06313.48
5.3.00.0030.07013.64
5.2.170.0070.05011.78
5.2.160.0000.06311.78
5.2.150.0070.06311.78
5.2.140.0000.06711.78
5.2.130.0030.06311.78
5.2.120.0030.05711.78
5.2.110.0030.06011.78
5.2.100.0070.05711.78
5.2.90.0030.06311.78
5.2.80.0070.06311.78
5.2.70.0030.06711.78
5.2.60.0000.04011.78
5.2.50.0070.06011.78
5.2.40.0070.05311.78
5.2.30.0030.05711.78
5.2.20.0030.04311.78
5.2.10.0070.06311.78
5.2.00.0070.05311.78
5.1.60.0000.04311.78
5.1.50.0100.04711.78
5.1.40.0070.03311.78
5.1.30.0000.03011.78
5.1.20.0030.05711.78
5.1.10.0030.05711.78
5.1.00.0030.05011.78
5.0.50.0000.03711.78
5.0.40.0100.02711.78
5.0.30.0030.06311.78
5.0.20.0030.04711.78
5.0.10.0000.04711.78
5.0.00.0030.06011.78
4.4.90.0000.03311.78
4.4.80.0070.03311.78
4.4.70.0000.03711.78
4.4.60.0030.03311.78
4.4.50.0070.03311.78
4.4.40.0070.04711.78
4.4.30.0030.02311.78
4.4.20.0070.03311.78
4.4.10.0000.03711.78
4.4.00.0070.05011.78
4.3.110.0070.03011.78
4.3.100.0030.02011.78
4.3.90.0000.03711.78
4.3.80.0000.05711.78
4.3.70.0030.03311.78
4.3.60.0000.02711.78
4.3.50.0030.03311.78
4.3.40.0030.05311.78
4.3.30.0000.03711.78
4.3.20.0000.03711.78
4.3.10.0000.03711.78
4.3.00.0000.03311.78

preferences:
37.49 ms | 401 KiB | 5 Q