3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getSearchResult($str, $query, $numOfWordToAdd) { $lowered = strtolower($query); $str = str_ireplace($query,$lowered,$str); var_dump(array('lowered' => $lowered, 'str' => $str)); list($before, $after) = explode($lowered, $str); } $body = "<p>This is the body, KeyWoRd to be searched is here.</p>"; $keyword = "kEyword"; echo getSearchResult($body,$keyword,1); ?>

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.70.0070.00716.58
8.3.60.0070.01118.43
8.3.50.0130.00322.01
8.3.40.0120.00318.67
8.3.30.0090.00919.17
8.3.20.0080.00020.15
8.3.10.0080.00023.66
8.3.00.0070.00020.84
8.2.180.0110.01116.63
8.2.170.0140.00422.96
8.2.160.0150.00420.43
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0120.00326.16
8.2.120.0040.00420.82
8.2.110.0090.00022.23
8.2.100.0000.01117.84
8.2.90.0000.00819.18
8.2.80.0050.00317.97
8.2.70.0000.00917.75
8.2.60.0060.00617.93
8.2.50.0060.00318.07
8.2.40.0040.00420.00
8.2.30.0040.00418.14
8.2.20.0000.00717.80
8.2.10.0070.00018.11
8.2.00.0040.00417.63
8.1.280.0130.00725.92
8.1.270.0040.00423.70
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.87
8.1.230.0040.00719.21
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0070.00417.22
8.1.190.0060.00317.11
8.1.180.0060.00318.10
8.1.170.0040.00418.46
8.1.160.0000.00721.88
8.1.150.0040.00418.57
8.1.140.0050.00317.34
8.1.130.0030.00317.83
8.1.120.0030.00517.29
8.1.110.0050.00317.29
8.1.100.0040.00417.43
8.1.90.0000.00717.38
8.1.80.0040.00417.25
8.1.70.0070.00017.39
8.1.60.0000.00817.61
8.1.50.0040.00417.56
8.1.40.0000.00717.45
8.1.30.0080.00017.55
8.1.20.0040.00417.58
8.1.10.0040.00417.48
8.1.00.0000.00717.40
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0080.00018.46
8.0.270.0000.00817.15
8.0.260.0060.00017.27
8.0.250.0000.00616.86
8.0.240.0040.00416.95
8.0.230.0000.00716.86
8.0.220.0040.00416.81
8.0.210.0080.00016.84
8.0.200.0070.00016.87
8.0.190.0090.00316.93
8.0.180.0040.00416.76
8.0.170.0040.00416.75
8.0.160.0020.00516.71
8.0.150.0030.00616.74
8.0.140.0000.00816.63
8.0.130.0030.00313.34
8.0.120.0000.00816.80
8.0.110.0050.00216.79
8.0.100.0050.00216.73
8.0.90.0070.00016.62
8.0.80.0140.00716.79
8.0.70.0040.00416.78
8.0.60.0000.00716.64
8.0.50.0000.00716.70
8.0.30.0160.00516.95
8.0.20.0060.01217.40
8.0.10.0040.00416.99
8.0.00.0100.00816.67
7.4.330.0040.00415.05
7.4.320.0000.00616.44
7.4.300.0030.00316.46
7.4.290.0000.00716.52
7.4.280.0000.00816.42
7.4.270.0030.00316.60
7.4.260.0070.00316.49
7.4.250.0000.00816.46
7.4.240.0040.00316.56
7.4.230.0000.00716.61
7.4.220.0140.00316.62
7.4.210.0040.01116.72
7.4.200.0070.00016.62
7.4.160.0090.01216.48
7.4.150.0110.00617.40
7.4.140.0120.00717.86
7.4.130.0110.00616.48
7.4.120.0080.00816.40
7.4.110.0030.01416.33
7.4.100.0110.00816.21
7.4.90.0100.00716.66
7.4.80.0070.01519.39
7.4.70.0060.01216.24
7.4.60.0090.00916.58
7.4.50.0000.00416.47
7.4.40.0100.01416.29
7.4.30.0040.01216.50
7.4.00.0060.01214.96
7.3.330.0050.00013.23
7.3.320.0060.00013.37
7.3.310.0030.00316.31
7.3.300.0020.00516.31
7.3.290.0000.01416.24
7.3.280.0070.00816.29
7.3.270.0130.00317.40
7.3.260.0130.01016.31
7.3.250.0100.00816.26
7.3.240.0120.00916.66
7.3.230.0150.00916.43
7.3.210.0140.00316.51
7.3.200.0100.01319.39
7.3.190.0060.01616.46
7.3.180.0080.00816.24
7.3.170.0060.01216.35
7.3.160.0060.00916.57
7.3.120.0060.01114.87
7.3.10.0030.01016.38
7.3.00.0060.01016.47
7.2.330.0110.00616.75
7.2.320.0090.01216.45
7.2.310.0140.01116.76
7.2.300.0120.00616.66
7.2.290.0120.00916.42
7.2.130.0000.01416.74
7.2.120.0140.00616.54
7.2.110.0080.00816.67
7.2.100.0080.00416.60
7.2.90.0060.00916.38
7.2.80.0030.00916.64
7.2.70.0070.01116.74
7.2.60.0100.00716.55
7.2.50.0070.01016.33
7.2.40.0250.00416.45
7.2.30.0090.00616.65
7.2.20.0110.00416.61
7.2.10.0070.00316.61
7.2.00.0080.00416.91
7.1.250.0090.00915.54
7.1.100.0030.01018.20
7.1.70.0000.00817.38
7.1.60.0060.01819.70
7.1.50.0120.00817.02
7.1.00.0100.07022.37
7.0.200.0040.00416.79
7.0.140.0130.06321.95
7.0.70.0070.08321.72
7.0.60.0170.07321.76
7.0.50.0100.07022.19
7.0.40.0100.07320.17
7.0.30.0000.07720.08
7.0.20.0030.04020.11
7.0.10.0030.04720.09
7.0.00.0070.05020.14
5.6.280.0070.06720.82
5.6.220.0100.07720.49
5.6.210.0070.07720.55
5.6.200.0000.09020.96
5.6.190.0100.08021.02
5.6.180.0070.05721.08
5.6.170.0100.05021.09
5.6.160.0070.03721.14
5.6.150.0000.04321.08
5.6.140.0030.06721.07
5.6.130.0000.04320.94
5.6.120.0000.04321.02
5.6.110.0030.08720.95
5.6.100.0030.05021.13
5.6.90.0030.07321.10
5.6.80.0070.04020.41
5.6.70.0000.04320.33
5.6.60.0070.03720.40
5.6.50.0030.04320.43
5.6.40.0000.05020.43
5.6.30.0030.03720.41
5.6.20.0070.03720.38
5.6.10.0030.03720.39
5.6.00.0030.03720.36
5.5.360.0030.08320.43
5.5.350.0030.08320.43
5.5.340.0030.08320.86
5.5.330.0130.07320.92
5.5.320.0100.05720.79
5.5.310.0030.04320.77
5.5.300.0070.03720.76
5.5.290.0030.04720.76
5.5.280.0070.04020.77
5.5.270.0030.04320.83
5.5.260.0030.06720.90
5.5.250.0030.08720.57
5.5.240.0030.07720.14
5.5.230.0000.04320.21
5.5.220.0030.04020.17
5.5.210.0030.04020.14
5.5.200.0000.04320.17
5.5.190.0000.04320.00
5.5.180.0070.03720.21
5.5.160.0030.07320.07
5.5.150.0000.04020.17
5.5.140.0070.03320.08
5.5.130.0000.07320.22
5.5.120.0000.04020.26
5.5.110.0030.03720.10
5.5.100.0000.06320.08
5.5.90.0100.03020.17
5.5.80.0000.05320.07
5.5.70.0030.03720.09
5.5.60.0000.03320.00
5.5.50.0030.05320.14
5.5.40.0000.06320.10
5.5.30.0030.03720.00
5.5.20.0030.03720.05
5.5.10.0000.04020.04
5.5.00.0030.04019.96
5.4.450.0000.04019.48
5.4.440.0000.04019.35
5.4.430.0070.03319.45
5.4.420.0070.08019.45
5.4.410.0000.06019.40
5.4.400.0100.07019.09
5.4.390.0000.05019.14
5.4.380.0030.03719.05
5.4.370.0100.03319.09
5.4.360.0030.08319.09
5.4.350.0030.05018.95
5.4.340.0030.03719.04
5.4.320.0030.05018.90
5.4.310.0000.04018.88
5.4.300.0000.03319.17
5.4.290.0000.03319.02
5.4.280.0000.04319.03
5.4.270.0000.04018.83
5.4.260.0030.03719.03
5.4.250.0030.03319.12
5.4.240.0030.03019.20
5.4.230.0000.04319.12
5.4.220.0000.04019.11
5.4.210.0000.03319.17
5.4.200.0000.03319.15
5.4.190.0030.03319.02
5.4.180.0030.03018.93
5.4.170.0000.05319.13
5.4.160.0000.06019.14
5.4.150.0000.03718.91
5.4.140.0030.07716.34
5.4.130.0030.04716.32
5.4.120.0000.06716.43
5.4.110.0030.07716.34
5.4.100.0030.04716.47
5.4.90.0100.04716.36
5.4.80.0030.07316.45
5.4.70.0000.07716.49
5.4.60.0030.05016.52
5.4.50.0030.06316.41
5.4.40.0000.05716.46
5.4.30.0030.04016.40
5.4.20.0000.06016.40
5.4.10.0100.07016.44
5.4.00.0070.07015.88
5.3.290.0000.03314.69
5.3.280.0030.04014.68
5.3.270.0030.03714.57
5.3.260.0030.04014.70
5.3.250.0070.03014.58
5.3.240.0000.04014.54
5.3.230.0000.06314.57
5.3.220.0000.08014.58
5.3.210.0070.07314.62
5.3.200.0100.05714.66
5.3.190.0030.07714.57
5.3.180.0070.07314.62
5.3.170.0030.08014.63
5.3.160.0030.07014.61
5.3.150.0130.07014.66
5.3.140.0070.07014.62
5.3.130.0030.08014.55
5.3.120.0000.06014.56
5.3.110.0030.08014.55
5.3.100.0030.07314.18
5.3.90.0030.05714.13
5.3.80.0000.05714.04
5.3.70.0100.06714.08
5.3.60.0030.06714.01
5.3.50.0030.07014.06
5.3.40.0030.07014.05
5.3.30.0000.05714.01
5.3.20.0000.05313.59
5.3.10.0070.05713.68
5.3.00.0030.07313.73
5.2.170.0030.04012.30
5.2.160.0030.06012.30
5.2.150.0000.04712.30
5.2.140.0000.04012.30
5.2.130.0070.05312.30
5.2.120.0030.04312.30
5.2.110.0030.04312.30
5.2.100.0030.04712.30
5.2.90.0030.05012.30
5.2.80.0030.04712.30
5.2.70.0100.05312.30
5.2.60.0000.07012.30
5.2.50.0000.06712.30
5.2.40.0000.06712.30
5.2.30.0030.05312.30
5.2.20.0030.05712.30
5.2.10.0000.05712.30
5.2.00.0030.06312.30
5.1.60.0030.05712.30
5.1.50.0030.05312.30
5.1.40.0000.04712.30
5.1.30.0030.05712.30
5.1.20.0000.04312.30
5.1.10.0030.03012.30
5.1.00.0000.04012.30
5.0.50.0030.03712.30
5.0.40.0000.04312.30
5.0.30.0000.04712.30
5.0.20.0070.04012.30
5.0.10.0030.04712.30
5.0.00.0070.06012.30
4.4.90.0000.03712.30
4.4.80.0070.03312.30
4.4.70.0070.03312.30
4.4.60.0070.03012.30
4.4.50.0030.03712.30
4.4.40.0030.05012.30
4.4.30.0070.03012.30
4.4.20.0000.02012.30
4.4.10.0070.03012.30
4.4.00.0030.05712.30
4.3.110.0070.03012.30
4.3.100.0000.03712.30
4.3.90.0070.03012.30
4.3.80.0000.04712.30
4.3.70.0070.02712.30
4.3.60.0000.03312.30
4.3.50.0000.03712.30
4.3.40.0000.03312.30
4.3.30.0000.01712.30
4.3.20.0000.02012.30
4.3.10.0000.03012.30
4.3.00.0070.03012.30

preferences:
40.68 ms | 401 KiB | 5 Q