3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checkfor = 'test'; $words = array('test','derp','herp'); for ($i = 1; $i++ < 100000;){ $flipped = array_flip($words); if (isset($flipped[$checkfor])) { echo "match\n"; } } /* if (in_array($checkfor,$words)) { echo "non-flip match"; } */

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.0170.01316.38
8.3.50.0190.00821.98
8.3.40.0170.00718.84
8.3.30.0210.00319.09
8.3.20.0090.00420.16
8.3.10.0120.00323.64
8.3.00.0110.00419.25
8.2.180.0170.01018.41
8.2.170.0200.00722.96
8.2.160.0170.00720.52
8.2.150.0090.00324.18
8.2.140.0100.00324.66
8.2.130.0120.00026.16
8.2.120.0080.00422.14
8.2.110.0150.00022.26
8.2.100.0180.00417.84
8.2.90.0090.00319.30
8.2.80.0070.00418.05
8.2.70.0040.00717.50
8.2.60.0070.00418.05
8.2.50.0040.00719.35
8.2.40.0000.01117.99
8.2.30.0030.00718.13
8.2.20.0100.00017.62
8.2.10.0070.00319.91
8.2.00.0040.01117.84
8.1.280.0160.00625.92
8.1.270.0030.00922.18
8.1.260.0080.00426.35
8.1.250.0090.00328.09
8.1.240.0100.00323.90
8.1.230.0170.00419.16
8.1.220.0070.00317.74
8.1.210.0040.00818.77
8.1.200.0000.01117.23
8.1.190.0040.00717.53
8.1.180.0050.00518.10
8.1.170.0060.00318.37
8.1.160.0090.00022.01
8.1.150.0060.00318.68
8.1.140.0030.00617.45
8.1.130.0060.00317.93
8.1.120.0000.01017.45
8.1.110.0100.00017.43
8.1.100.0030.00617.34
8.1.90.0030.00717.47
8.1.80.0070.00317.32
8.1.70.0030.00717.46
8.1.60.0070.00317.59
8.1.50.0000.01117.41
8.1.40.0100.00017.51
8.1.30.0000.01017.51
8.1.20.0030.00717.45
8.1.10.0030.00617.52
8.1.00.0050.00517.58
8.0.300.0030.00618.77
8.0.290.0070.00417.05
8.0.280.0030.01018.23
8.0.270.0030.00717.18
8.0.260.0030.00617.15
8.0.250.0060.00316.81
8.0.240.0070.00316.69
8.0.230.0030.00616.74
8.0.220.0000.00916.75
8.0.210.0070.00316.65
8.0.200.0030.00716.80
8.0.190.0070.00316.63
8.0.180.0070.00316.80
8.0.170.0030.00716.73
8.0.160.0070.00416.66
8.0.150.0030.00716.61
8.0.140.0030.00716.61
8.0.130.0000.00813.21
8.0.120.0030.00716.70
8.0.110.0030.00616.60
8.0.100.0000.00916.77
8.0.90.0030.00616.72
8.0.80.0170.01716.74
8.0.70.0040.00716.60
8.0.60.0060.00616.60
8.0.50.0030.00616.65
8.0.30.0320.01216.82
8.0.20.0240.02017.40
8.0.10.0060.00316.70
8.0.00.0230.01516.73
7.4.330.0090.00015.03
7.4.320.0090.00016.38
7.4.300.0000.01316.38
7.4.290.0060.00616.30
7.4.280.0030.00716.41
7.4.270.0060.00316.21
7.4.260.0070.00716.38
7.4.250.0080.00316.22
7.4.240.0030.00616.42
7.4.230.0030.00616.20
7.4.220.0260.03316.41
7.4.210.0120.02216.38
7.4.200.0080.00316.15
7.4.190.0030.00716.21
7.4.160.0170.02016.36
7.4.150.0180.01817.40
7.4.140.0240.02217.86
7.4.130.0370.01416.42
7.4.120.0360.01116.35
7.4.110.0190.01616.43
7.4.100.0190.02216.40
7.4.90.0130.02316.36
7.4.80.0320.00619.39
7.4.70.0290.00316.46
7.4.60.0180.01116.50
7.4.50.0060.00016.44
7.4.40.0130.01322.77
7.4.30.0170.02116.29
7.3.330.0000.00813.17
7.3.320.0060.00313.15
7.3.310.0030.00716.15
7.3.300.0030.00616.13
7.3.290.0080.02016.12
7.3.280.0220.02716.16
7.3.270.0240.01317.40
7.3.260.0430.01316.11
7.3.250.0350.02316.10
7.3.240.0370.00616.20
7.3.230.0300.01016.39
7.3.210.0350.00516.09
7.3.200.0360.02419.39
7.3.190.0410.01316.46
7.3.180.0200.01016.43
7.3.170.0120.02416.47
7.3.160.0300.02016.36
7.2.330.0190.02216.52
7.2.320.0260.02316.67
7.2.310.0260.02416.32
7.2.300.0100.02116.52
7.2.290.0140.02116.46
7.2.100.1460.01914.40
7.2.90.1420.01514.53
7.2.80.0230.01014.17
7.2.70.0810.01514.78
7.2.60.0150.02114.80
7.2.50.1900.01014.84
7.2.40.0410.01014.88
7.2.30.0400.01714.52
7.2.20.0550.00314.77
7.2.10.0270.02414.82
7.2.00.1260.01214.77
7.1.220.0300.02413.57
7.1.210.1260.01013.63
7.1.200.0250.00713.82
7.1.190.0320.00013.64
7.1.180.0390.01113.76
7.1.170.1710.00713.63
7.1.160.1580.01513.56
7.1.150.0370.01713.39
7.1.140.0240.00613.52
7.1.130.0730.02313.61
7.1.120.1470.01313.89
7.1.110.0380.01914.00
7.1.100.1510.01213.59
7.1.90.1470.01713.63
7.1.80.1930.01213.80
7.1.70.0720.01414.02
7.1.60.1970.02031.86
7.1.50.0450.00932.15
7.1.40.0620.01932.11
7.1.30.0350.02731.78
7.1.20.0340.02631.81
7.1.10.1050.02313.79
7.1.00.2010.02013.71
7.0.310.0230.01013.54
7.0.300.0440.01513.22
7.0.290.0280.01113.08
7.0.280.0740.01013.42
7.0.270.1620.01013.60
7.0.260.0310.00813.47
7.0.250.1150.01413.38
7.0.240.0730.01513.35
7.0.230.1690.01313.46
7.0.220.1730.01413.18
7.0.210.0080.01913.46
7.0.200.0290.01613.49
7.0.190.0140.01413.64
7.0.180.1600.01713.44
7.0.170.1950.00913.32
7.0.160.1750.01613.64
7.0.150.1110.00713.20
7.0.140.0310.01513.55
7.0.130.0880.02113.67
7.0.120.1690.01313.95
7.0.110.0590.01313.74
7.0.100.1730.01313.30
7.0.90.1620.01313.21
7.0.80.0580.01313.23
7.0.70.1790.01513.47
7.0.60.0560.00713.40
7.0.50.1890.01013.54
7.0.40.1080.01413.71
7.0.30.0230.00613.91
7.0.20.1520.01713.27
7.0.10.1950.01313.60
7.0.00.0380.01213.66
5.6.380.0220.01914.36
5.6.370.0210.00514.32
5.6.360.0100.02614.05
5.6.350.0310.00713.90
5.6.340.0180.01814.05
5.6.330.0160.01314.22
5.6.320.0190.01113.73
5.6.310.0170.01414.17
5.6.300.0200.01313.94
5.6.290.0170.01914.46
5.6.280.0150.01514.26
5.6.270.0120.02414.34
5.6.260.0210.00514.35
5.6.250.0260.00714.05
5.6.240.0260.00814.08
5.6.230.0220.01614.27
5.6.220.0270.00014.11
5.6.210.0210.01714.13
5.6.200.0290.00514.22
5.6.190.0190.01013.87
5.6.180.0220.01513.97
5.6.170.0140.01713.79
5.6.160.0220.01114.30
5.6.150.0230.01213.79
5.6.140.0090.01913.73
5.6.130.0260.00714.18
5.6.120.0120.01614.12
5.6.110.0270.00614.24
5.6.100.0150.01814.40
5.6.90.0110.01513.84
5.6.80.0140.02514.12
5.6.70.0160.01614.04
5.6.60.0120.02214.07
5.6.50.0260.01314.34
5.6.40.0210.02714.05
5.6.30.0320.01113.93
5.6.20.0260.01314.05
5.6.10.0240.01314.01
5.6.00.0090.02614.05
5.5.380.0400.03012.33
5.5.370.0170.01212.33
5.5.360.0210.01212.33
5.5.350.0070.01412.33
5.5.340.0290.01312.33
5.5.330.0190.01012.33
5.5.320.0150.01212.33
5.5.310.0260.02212.33
5.5.300.0100.01412.33
5.5.290.0120.02212.33
5.5.280.0100.01612.33
5.5.270.0130.01912.33
5.5.260.0160.01612.33
5.5.250.0110.01112.33
5.5.240.0150.01512.33
5.5.230.0130.01612.33
5.5.220.0080.01912.33
5.5.210.0190.01612.33
5.5.200.0240.00812.33
5.5.190.0140.02112.33
5.5.180.0150.01812.33
5.5.170.0110.02214.20
5.5.160.0130.02212.33
5.5.150.0260.00412.33
5.4.450.0150.00812.33
5.4.440.0170.00712.33
5.4.430.0160.01512.33
5.4.420.0110.01412.33
5.4.410.0110.01812.33
5.4.400.0150.02012.33
5.4.390.0030.02312.33
5.4.380.0130.01312.33
5.4.370.0160.01312.33
5.4.360.0200.01012.33
5.4.350.0150.02012.33
5.4.340.0230.01012.33
5.4.330.0110.02712.33
5.4.320.0110.02212.33
5.3.290.0190.01512.33

preferences:
44.28 ms | 401 KiB | 5 Q