3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_key = "\x00" . uniqid(); $var[$my_key] = 'hi'; 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.3.00.0130.00316.34
7.2.130.0110.01116.82
7.2.120.0070.00716.79
7.2.110.0060.00916.68
7.2.100.0040.01116.50
7.2.90.0070.00716.55
7.2.80.0030.00716.63
7.2.70.0100.00716.77
7.2.60.0090.00616.72
7.2.50.0130.00316.59
7.2.40.0060.00916.52
7.2.30.0080.00416.81
7.2.20.0100.00316.53
7.2.10.0080.00816.68
7.2.00.0070.01116.87
7.1.250.0120.00415.73
7.1.240.0050.01015.44
7.1.230.0040.00815.51
7.1.220.0170.00015.56
7.1.210.0000.01515.79
7.1.200.0070.01415.36
7.1.190.0040.01115.84
7.1.180.0100.00615.42
7.1.170.0130.00715.92
7.1.160.0070.01115.78
7.1.150.0060.00915.76
7.1.140.0110.00315.59
7.1.130.0090.00315.70
7.1.120.0000.01515.69
7.1.110.0110.00315.59
7.1.100.0030.01015.48
7.1.90.0090.00615.58
7.1.80.0100.00315.35
7.1.70.0100.00216.40
7.1.60.0090.00817.61
7.1.50.0080.01016.29
7.1.40.0080.00415.81
7.1.30.0120.00815.48
7.1.20.0150.00515.91
7.1.10.0070.00715.65
7.1.00.0110.03719.06
7.0.330.0060.00614.91
7.0.320.0090.00615.41
7.0.310.0030.00615.13
7.0.300.0120.00015.27
7.0.290.0140.00315.04
7.0.280.0000.01415.36
7.0.270.0100.00015.18
7.0.260.0160.00015.13
7.0.250.0090.00915.16
7.0.240.0070.00715.20
7.0.230.0150.00415.26
7.0.220.0060.00615.02
7.0.210.0070.01415.06
7.0.200.0080.00215.92
7.0.190.0060.00914.86
7.0.180.0100.00315.38
7.0.170.0060.00615.00
7.0.160.0100.00614.96
7.0.150.0130.00315.04
7.0.140.0050.04218.60
7.0.130.0130.00615.23
7.0.120.0070.00715.23
7.0.110.0140.00015.07
7.0.100.0320.04217.49
7.0.90.0290.03817.51
7.0.80.0240.04617.48
7.0.70.0300.03717.58
7.0.60.0270.04717.45
7.0.50.0270.02717.71
7.0.40.0070.04016.76
7.0.30.0070.03916.68
7.0.20.0060.03816.64
7.0.10.0080.04116.61
7.0.00.0090.03916.73
5.6.380.0040.00814.19
5.6.370.0060.00614.35
5.6.360.0070.01014.48
5.6.350.0030.00614.38
5.6.340.0100.00313.82
5.6.330.0060.00314.36
5.6.320.0040.00714.18
5.6.310.0030.00514.38
5.6.300.0030.00713.82
5.6.290.0040.01114.18
5.6.280.0070.04017.65
5.6.270.0030.01314.38
5.6.260.0060.00914.38
5.6.250.0060.04417.46
5.6.240.0030.05017.38
5.6.230.0080.04317.55
5.6.220.0110.04117.41
5.6.210.0080.04517.39
5.6.200.0070.03017.55
5.6.190.0050.04517.63
5.6.180.0030.04617.72
5.6.170.0090.04117.62
5.6.160.0080.04217.64
5.6.150.0070.02517.62
5.6.140.0050.03717.78
5.6.130.0030.04717.71
5.6.120.0030.04817.69
5.6.110.0100.04217.59
5.6.100.0030.04017.58
5.6.90.0120.04217.79
5.6.80.0030.04117.39
5.6.70.0070.04017.15
5.6.60.0060.04117.21
5.6.50.0070.04117.18
5.6.40.0050.04317.27
5.6.30.0050.04517.41
5.6.20.0120.03817.32
5.6.10.0080.03717.51
5.6.00.0080.03917.45
5.5.380.0050.04515.85
5.5.370.0060.04115.86
5.5.360.0080.04215.71
5.5.350.0070.04015.64
5.5.340.0030.04416.03
5.5.330.0050.05215.89
5.5.320.0070.04016.07
5.5.310.0100.03815.92
5.5.300.0100.02015.99
5.5.290.0020.05015.96
5.5.280.0080.03515.82
5.5.270.0110.04215.89
5.5.260.0050.04715.88
5.5.250.0100.04115.91
5.5.240.0080.03815.63
5.5.230.0020.04415.60
5.5.220.0070.04215.62
5.5.210.0060.03615.66
5.5.200.0120.03915.59
5.5.190.0080.03715.57
5.5.180.0070.04015.71
5.5.170.0030.00310.90
5.5.160.0070.04015.58
5.5.150.0030.04015.63
5.5.140.0050.04015.51
5.5.130.0100.03015.66
5.5.120.0080.02515.67
5.5.110.0050.03815.66
5.5.100.0050.03815.42
5.5.90.0050.04215.56
5.5.80.0070.03215.56
5.5.70.0070.03715.53
5.5.60.0100.03515.58
5.5.50.0130.03315.54
5.5.40.0050.04315.56
5.5.30.0070.04115.50
5.5.20.0070.03615.57
5.5.10.0020.04515.53
5.5.00.0020.02815.54
5.4.450.0050.03515.09
5.4.440.0080.04015.08
5.4.430.0030.03715.08
5.4.420.0100.03715.18
5.4.410.0070.04015.12
5.4.400.0070.03915.00
5.4.390.0050.04414.97
5.4.380.0060.04014.94
5.4.370.0090.03614.96
5.4.360.0040.04214.86
5.4.350.0120.03015.05
5.4.340.0060.03214.98
5.4.330.0040.01211.01
5.4.320.0110.03615.08
5.4.310.0080.03114.98
5.4.300.0090.03814.96
5.4.290.0080.03915.16
5.4.280.0050.02514.84
5.4.270.0090.03715.00
5.4.260.0060.03815.02
5.4.250.0070.03714.94
5.4.240.0080.04015.07
5.4.230.0030.03315.03
5.4.220.0040.04115.10
5.4.210.0060.04015.11
5.4.200.0070.03715.00
5.4.190.0060.03914.92
5.4.180.0090.04014.96
5.4.170.0050.03815.06
5.4.160.0070.02215.02
5.4.150.0090.01715.06
5.4.140.0030.04013.62
5.4.130.0070.02213.72
5.4.120.0010.02313.54
5.4.110.0050.02213.58
5.4.100.0030.02213.69
5.4.90.0030.01813.64
5.4.80.0050.02913.57
5.4.70.0020.02213.66
5.4.60.0050.03713.72
5.4.50.0030.02013.67
5.4.40.0020.02113.67
5.4.30.0050.03813.74
5.4.20.0040.02913.65
5.4.10.0020.03213.62
5.4.00.0060.01913.36
5.3.290.0060.04012.76
5.3.280.0050.03812.68
5.3.270.0030.04212.73
5.3.260.0060.02012.72
5.3.250.0020.02712.66
5.3.240.0060.04012.69
5.3.230.0030.02312.74
5.3.220.0030.02312.72
5.3.210.0030.02512.73
5.3.200.0020.02312.71
5.3.190.0040.02312.71
5.3.180.0020.02312.65
5.3.170.0020.04012.71
5.3.160.0050.02012.66
5.3.150.0000.04112.66
5.3.140.0050.03912.68
5.3.130.0070.02712.70
5.3.120.0050.02112.64
5.3.110.0020.03712.72
5.3.100.0070.02112.44
5.3.90.0030.02012.37
5.3.80.0070.03512.39
5.3.70.0000.02412.41
5.3.60.0060.01812.42
5.3.50.0020.02612.42
5.3.40.0070.01712.40
5.3.30.0020.02212.38
5.3.20.0020.02612.28
5.3.10.0050.01812.17
5.3.00.0000.02312.15
5.2.170.0020.02211.02
5.2.160.0040.01710.98
5.2.150.0030.01610.93
5.2.140.0000.02410.98
5.2.130.0020.01810.92
5.2.120.0000.02010.92
5.2.110.0020.02011.03
5.2.100.0030.01411.01
5.2.90.0020.01611.03
5.2.80.0000.01810.99
5.2.70.0030.03311.03
5.2.60.0000.01811.00
5.2.50.0020.01910.95
5.2.40.0020.01710.85
5.2.30.0020.01510.86
5.2.20.0030.01710.96
5.2.10.0020.01810.91
5.2.00.0000.02310.76
5.1.60.0080.01210.45
5.1.50.0030.01210.36
5.1.40.0010.01310.36
5.1.30.0040.02110.54
5.1.20.0060.01310.63
5.1.10.0010.01610.47
5.1.00.0010.01610.51
5.0.50.0000.0249.64
5.0.40.0020.0129.65
5.0.30.0000.0199.55
5.0.20.0000.0149.47
5.0.10.0020.0129.53
5.0.00.0030.0179.46
4.4.90.0050.0079.44
4.4.80.0020.0109.44
4.4.70.0030.0109.44
4.4.60.0020.0119.44
4.4.50.0000.0109.44
4.4.40.0020.0159.44
4.4.30.0020.0109.44
4.4.20.0020.0119.44
4.4.10.0010.0159.44
4.4.00.0030.0119.44
4.3.110.0000.0209.44
4.3.100.0020.0089.44
4.3.90.0050.0089.44
4.3.80.0020.0129.44
4.3.70.0030.0129.44
4.3.60.0030.0159.44
4.3.50.0070.0139.44
4.3.40.0000.0289.44
4.3.30.0020.0179.44
4.3.20.0000.0159.44
4.3.10.0000.0189.44
4.3.00.0030.0159.44

preferences:
40.4 ms | 400 KiB | 5 Q