3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matiere1 = 'Cotton 2'; $matiere2 = 'lol'; echo "Matiere1 : ".checkMatiere($matiere1)." - Matiere2 : ".checkMatiere($matiere2); function checkMatiere($matiere){ $matiere = strtolower($matiere); switch ($matiere) { case (strpos($matiere, 'cotton') !== FALSE): $matiere = 'coton'; break; default: $matiere = "KO"; break; } }

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.0090.00916.63
8.3.50.0080.00721.97
8.3.40.0090.01218.67
8.3.30.0090.00618.93
8.3.20.0040.00420.21
8.3.10.0080.00021.82
8.3.00.0080.00019.25
8.2.180.0190.00318.30
8.2.170.0170.00022.96
8.2.160.0070.00720.36
8.2.150.0080.00024.18
8.2.140.0130.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00019.38
8.2.110.0060.00320.84
8.2.100.0080.00417.78
8.2.90.0000.00817.63
8.2.80.0090.00018.47
8.2.70.0040.00417.63
8.2.60.0080.00017.80
8.2.50.0030.00518.07
8.2.40.0050.00319.95
8.2.30.0040.00418.04
8.2.20.0000.00817.68
8.2.10.0000.00718.13
8.2.00.0000.00817.65
8.1.280.0060.01325.92
8.1.270.0060.00320.32
8.1.260.0020.00526.35
8.1.250.0030.00528.09
8.1.240.0090.00022.20
8.1.230.0080.00417.67
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0000.00817.23
8.1.190.0030.00617.35
8.1.180.0080.00018.10
8.1.170.0040.00420.16
8.1.160.0000.00821.93
8.1.150.0030.00618.77
8.1.140.0040.00417.50
8.1.130.0040.00417.86
8.1.120.0020.00517.40
8.1.110.0020.00517.48
8.1.100.0040.00417.32
8.1.90.0040.00417.36
8.1.80.0070.00017.48
8.1.70.0000.00717.38
8.1.60.0030.00617.59
8.1.50.0060.00317.52
8.1.40.0050.00217.47
8.1.30.0000.00817.58
8.1.20.0070.00017.54
8.1.10.0000.01117.52
8.1.00.0030.00617.49
8.0.300.0000.00718.77
8.0.290.0080.00016.63
8.0.280.0030.00518.41
8.0.270.0000.00817.21
8.0.260.0030.00517.30
8.0.250.0080.00016.85
8.0.240.0000.00616.84
8.0.230.0000.00716.98
8.0.220.0000.00616.80
8.0.210.0070.00016.76
8.0.200.0030.00616.85
8.0.190.0090.00016.98
8.0.180.0050.00216.96
8.0.170.0030.00616.91
8.0.160.0080.00016.86
8.0.150.0070.00016.82
8.0.140.0000.00716.78
8.0.130.0040.00413.28
8.0.120.0000.00816.84
8.0.110.0000.00716.93
8.0.100.0000.00716.88
8.0.90.0080.00016.78
8.0.80.0140.00316.82
8.0.70.0040.00417.01
8.0.60.0050.00316.85
8.0.50.0040.00416.84
8.0.30.0090.01416.99
8.0.20.0110.01117.40
8.0.10.0050.00216.87
8.0.00.0120.00916.69
7.4.330.0000.00515.09
7.4.320.0060.00016.52
7.4.300.0000.00616.63
7.4.290.0040.00416.47
7.4.280.0040.00816.60
7.4.270.0070.00016.62
7.4.260.0000.01016.60
7.4.250.0070.00016.55
7.4.240.0000.00816.53
7.4.230.0000.00716.67
7.4.220.0160.00316.66
7.4.210.0060.00916.55
7.4.200.0070.00016.40
7.4.160.0080.00816.73
7.4.150.0190.00617.40
7.4.140.0110.00817.86
7.4.130.0150.00516.43
7.4.120.0100.00816.39
7.4.110.0130.01016.47
7.4.100.0090.01316.26
7.4.90.0150.00916.41
7.4.80.0090.00919.39
7.4.70.0070.01116.55
7.4.60.0110.01116.40
7.4.50.0040.00416.56
7.4.40.0160.00016.67
7.4.30.0170.00016.44
7.4.00.0030.01215.03
7.3.330.0000.00613.30
7.3.320.0060.00613.25
7.3.310.0030.00316.28
7.3.300.0000.00716.27
7.3.290.0030.00316.19
7.3.280.0070.00916.31
7.3.270.0130.00417.40
7.3.260.0090.00916.35
7.3.250.0060.01216.51
7.3.240.0100.00716.43
7.3.230.0100.01816.39
7.3.210.0160.00316.39
7.3.200.0080.00819.39
7.3.190.0090.00916.37
7.3.180.0120.00316.56
7.3.170.0100.00716.31
7.3.160.0030.01416.43
7.3.10.0050.01216.35
7.3.00.0020.00816.62
7.2.330.0110.01116.77
7.2.320.0070.01416.67
7.2.310.0040.01516.54
7.2.300.0090.00616.54
7.2.290.0100.00716.56
7.2.130.0060.00916.80
7.2.120.0090.01216.44
7.2.110.0080.01116.82
7.2.100.0100.00816.64
7.2.90.0080.00916.77
7.2.80.0110.00616.84
7.2.70.0140.00616.58
7.2.60.0120.00216.53
7.2.50.0040.00816.66
7.2.40.0050.01116.37
7.2.30.0080.00716.78
7.2.20.0130.00516.64
7.2.10.0120.00716.64
7.2.00.0090.01017.68
7.1.250.0230.00815.46
7.1.200.0030.00615.69
7.1.100.0000.01317.86
7.1.70.0000.00816.94
7.1.60.0070.01819.50
7.1.50.0230.01334.81
7.1.00.0070.07322.33
7.0.200.2600.00614.42
7.0.140.0000.07021.98
7.0.60.0100.08319.91
7.0.50.0030.09017.87
7.0.40.0030.06320.20
7.0.30.0270.08020.10
7.0.20.0170.04320.07
7.0.10.0330.07320.19
7.0.00.0070.05320.06
5.6.280.0000.07721.04
5.6.210.0100.08020.62
5.6.200.0130.08018.26
5.6.190.0030.08020.61
5.6.180.0330.06020.44
5.6.170.0470.07020.55
5.6.160.0070.08020.56
5.6.150.0030.04318.29
5.6.140.0070.04718.28
5.6.130.0000.09018.19
5.6.120.0130.08021.18
5.6.110.0130.06721.12
5.6.100.0000.04320.89
5.6.90.0030.06320.88
5.6.80.0130.07720.35
5.6.70.0230.06720.50
5.5.350.0230.08320.36
5.5.340.0070.05017.95
5.5.330.0100.08720.33
5.5.320.0030.06020.32
5.5.310.0330.07020.23
5.5.300.0100.08018.08
5.5.290.0070.04318.02
5.5.280.0070.03720.85
5.5.270.0070.05720.98
5.5.260.0030.07020.84
5.5.250.0100.07720.50
5.5.240.0030.03720.16
5.4.450.0170.05719.40
5.4.440.1030.05319.63
5.4.430.1030.05319.69
5.4.420.0870.06019.35
5.4.410.0170.04718.70
5.4.400.0570.05318.80
5.4.390.0630.05318.75
5.4.380.0430.05718.62
5.4.370.0430.04718.50
5.4.360.0470.05318.51
5.4.350.0400.05018.75
5.4.340.0430.05318.41
5.4.320.0070.06018.75
5.4.310.0100.07018.74
5.4.300.0400.05018.80
5.4.290.2700.08018.49
5.4.280.0530.05718.75
5.4.270.1400.07018.47
5.4.260.0570.04318.83
5.4.250.1970.07018.80
5.4.240.0530.07318.52
5.4.230.0570.06018.52
5.4.220.0330.06018.53
5.4.210.0430.06318.48
5.4.200.1330.05316.61
5.4.190.0430.05718.82
5.4.180.0570.06018.46
5.4.170.1270.07018.74
5.4.160.0370.06718.68
5.4.150.0430.06318.76
5.4.140.0430.06016.30
5.4.130.1330.06316.27
5.4.120.0370.07316.30
5.4.110.0370.06716.15
5.4.100.0300.07016.29
5.4.90.0330.07016.21
5.4.80.0330.06316.33
5.4.70.0330.05316.27
5.4.60.0470.05016.15
5.4.50.0300.07016.16
5.4.40.0330.05316.25
5.4.30.0270.06316.29
5.4.20.0430.06316.29
5.4.10.0530.05316.16
5.4.00.0230.08315.65
5.3.290.0430.06314.77
5.3.280.0470.06314.71
5.3.270.0370.06714.82
5.3.260.1300.06314.63
5.3.250.0330.05014.62
5.3.240.0230.05714.64
5.3.230.1170.06014.61
5.3.220.0430.06014.61
5.3.210.0370.07014.58
5.3.200.0430.06014.69
5.3.190.0530.04314.62
5.3.180.0400.05314.77
5.3.170.0370.05314.69
5.3.160.0370.05014.66
5.3.150.0630.06014.66
5.3.140.0400.04714.59
5.3.130.0230.06314.52
5.3.120.0300.07014.71
5.3.110.0670.06314.65
5.3.100.0370.05714.14
5.3.90.0270.07014.05
5.3.80.0370.04714.06
5.3.70.0670.05714.19
5.3.60.0370.05314.23
5.3.50.0430.05313.98
5.3.40.1200.06014.12
5.3.30.0470.06013.96
5.3.20.0530.05313.71
5.3.10.0430.05013.88
5.3.00.0230.06013.67
5.2.170.0200.06311.27
5.2.160.1030.03711.26
5.2.150.0330.05011.25
5.2.140.0430.04311.14
5.2.130.0430.04711.15
5.2.120.0300.04011.14
5.2.110.0330.04311.10
5.2.100.0330.04311.08
5.2.90.0430.02711.30
5.2.80.0600.04311.15
5.2.70.0370.03711.13
5.2.60.0370.04011.11
5.2.50.0330.04311.06
5.2.40.0170.05011.05
5.2.30.0700.05011.09
5.2.20.0870.03711.16
5.2.10.0270.04010.96
5.2.00.0400.05010.93
5.1.60.0230.03310.10
5.1.50.0130.0409.98
5.1.40.0930.05310.00
5.1.30.0630.03710.43
5.1.20.0270.03710.48
5.1.10.0400.03710.19
5.1.00.0270.04710.16
5.0.50.0170.0378.56
5.0.40.0130.0408.39
5.0.30.0100.0608.40
5.0.20.0270.0278.23
5.0.10.0130.0338.16
5.0.00.0130.0538.25
4.4.90.0170.0235.93
4.4.80.0130.0235.99
4.4.70.0030.0305.96
4.4.60.0130.0275.92
4.4.50.0170.0235.90
4.4.40.0100.0435.92
4.4.30.0170.0235.88
4.4.20.0200.0206.03
4.4.10.0130.0205.95
4.4.00.0130.0375.94
4.3.110.0500.0235.91
4.3.100.0170.0205.81
4.3.90.0100.0235.79
4.3.80.0200.0275.83
4.3.70.0470.0275.82
4.3.60.0100.0235.79
4.3.50.0130.0205.79
4.3.40.0070.0375.79
4.3.30.0070.0234.55
4.3.20.0570.0174.66
4.3.10.0030.0304.61
4.3.00.0000.0236.90

preferences:
42.12 ms | 401 KiB | 5 Q