3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getSearchResult($str, $query, $numOfWordToAdd) { $lowered = strtolower($query); $str = str_replace($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.60.0040.01118.43
8.3.50.0110.00822.12
8.3.40.0120.00318.84
8.3.30.0110.00419.08
8.3.20.0040.00420.16
8.3.10.0040.00423.48
8.3.00.0050.00320.80
8.2.180.0070.01417.00
8.2.170.0070.01422.96
8.2.160.0060.01020.52
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0110.00026.16
8.2.120.0080.00020.77
8.2.110.0060.00322.14
8.2.100.0100.00618.03
8.2.90.0080.00019.22
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0070.00317.91
8.2.50.0030.00618.07
8.2.40.0030.00519.95
8.2.30.0030.00518.23
8.2.20.0050.00317.68
8.2.10.0040.00417.99
8.2.00.0040.00417.63
8.1.280.0070.00725.92
8.1.270.0000.00924.01
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0050.00523.88
8.1.230.0040.00719.01
8.1.220.0040.00417.77
8.1.210.0040.00718.77
8.1.200.0090.00017.36
8.1.190.0060.00317.09
8.1.180.0040.00418.10
8.1.170.0050.00318.51
8.1.160.0000.00721.90
8.1.150.0000.00718.58
8.1.140.0040.00417.33
8.1.130.0000.00717.80
8.1.120.0050.00217.44
8.1.110.0070.00017.33
8.1.100.0040.00417.39
8.1.90.0000.00717.28
8.1.80.0000.00717.39
8.1.70.0030.00317.28
8.1.60.0030.00617.59
8.1.50.0030.00617.54
8.1.40.0060.00317.55
8.1.30.0030.00617.71
8.1.20.0080.00017.55
8.1.10.0000.00717.49
8.1.00.0000.00717.54
8.0.300.0040.00420.64
8.0.290.0090.00016.75
8.0.280.0050.00218.46
8.0.270.0040.00417.22
8.0.260.0030.00317.26
8.0.250.0000.00717.09
8.0.240.0050.00316.92
8.0.230.0000.00716.92
8.0.220.0000.00716.93
8.0.210.0000.00816.88
8.0.200.0040.00417.00
8.0.190.0030.00616.94
8.0.180.0000.00716.88
8.0.170.0040.00416.94
8.0.160.0040.00316.95
8.0.150.0040.00416.79
8.0.140.0050.00316.70
8.0.130.0030.00313.38
8.0.120.0040.00416.84
8.0.110.0000.00816.79
8.0.100.0070.00016.81
8.0.90.0000.00716.95
8.0.80.0110.01116.95
8.0.70.0040.00416.72
8.0.60.0000.00816.84
8.0.50.0070.00016.72
8.0.30.0120.00717.02
8.0.20.0080.01117.40
8.0.10.0050.00217.05
8.0.00.0110.00916.75
7.4.330.0060.00015.02
7.4.320.0060.00016.50
7.4.300.0060.00016.38
7.4.290.0040.00416.43
7.4.280.0040.00416.65
7.4.270.0030.00316.62
7.4.260.0080.00016.62
7.4.250.0000.00716.38
7.4.240.0000.00716.57
7.4.230.0040.00416.59
7.4.220.0120.00616.47
7.4.210.0060.00916.68
7.4.200.0030.00316.35
7.4.160.0150.00616.41
7.4.150.0230.00617.40
7.4.140.0100.01017.86
7.4.130.0070.01016.50
7.4.120.0120.00816.41
7.4.110.0060.01116.63
7.4.100.0120.00616.67
7.4.90.0120.00616.44
7.4.80.0070.01119.39
7.4.70.0160.00616.63
7.4.60.0070.01416.64
7.4.50.0030.00616.46
7.4.40.0060.01516.38
7.4.30.0090.00916.61
7.4.00.0110.00414.94
7.3.330.0020.00213.37
7.3.320.0000.00513.11
7.3.310.0000.00716.39
7.3.300.0000.00616.42
7.3.290.0110.00316.38
7.3.280.0150.00516.37
7.3.270.0040.01517.40
7.3.260.0100.01316.42
7.3.250.0120.00716.42
7.3.240.0150.00616.63
7.3.230.0140.00316.62
7.3.210.0080.01116.39
7.3.200.0030.01419.39
7.3.190.0080.00916.42
7.3.180.0080.00816.29
7.3.170.0060.01616.41
7.3.160.0060.00916.54
7.3.120.0070.00714.65
7.3.10.0110.00816.54
7.3.00.0050.00916.56
7.2.330.0090.00916.65
7.2.320.0030.01616.64
7.2.310.0130.00616.41
7.2.300.0090.00916.32
7.2.290.0100.00716.58
7.2.130.0090.00916.96
7.2.120.0110.00816.66
7.2.110.0080.00816.76
7.2.100.0070.00816.72
7.2.90.0100.01216.83
7.2.80.0110.00716.68
7.2.70.0090.00416.70
7.2.60.0110.00616.68
7.2.50.0070.00916.88
7.2.40.0030.01116.67
7.2.30.0070.00816.71
7.2.20.0080.00816.73
7.2.10.0120.00616.64
7.2.00.0100.00617.48
7.1.250.0050.00815.58
7.1.240.0060.00615.64
7.1.230.0050.00815.80
7.1.220.0050.00715.74
7.1.210.0050.00815.72
7.1.200.0050.00715.83
7.1.190.0080.00615.51
7.1.180.0070.00515.77
7.1.170.0060.00515.61
7.1.160.0030.01215.69
7.1.150.0030.01015.68
7.1.140.0060.01015.75
7.1.130.0030.00615.77
7.1.120.0030.00615.77
7.1.110.0060.00615.83
7.1.100.0050.00816.48
7.1.90.0080.00615.88
7.1.80.0080.00615.60
7.1.70.0050.00516.35
7.1.60.0100.00917.05
7.1.50.0090.00816.13
7.1.40.0090.00615.88
7.1.30.0040.00915.73
7.1.20.0090.00515.77
7.1.10.0070.00715.79
7.1.00.0020.03118.00
7.0.330.0000.01415.12
7.0.320.0070.00615.20
7.0.310.0050.00715.20
7.0.300.0110.00415.45
7.0.290.0040.00415.19
7.0.280.0090.00815.35
7.0.270.0130.00315.35
7.0.260.0050.00815.36
7.0.250.0060.00815.32
7.0.240.0050.00715.37
7.0.230.0020.00715.36
7.0.220.0020.00815.46
7.0.210.0050.00815.39
7.0.200.0050.00615.88
7.0.190.0110.00515.44
7.0.180.0030.00915.41
7.0.170.0080.00715.44
7.0.160.0080.00815.36
7.0.150.0030.00715.33
7.0.140.0070.02617.51
7.0.130.0060.00615.51
7.0.120.0030.01315.49
7.0.110.0030.01115.22
7.0.100.0070.00615.32
7.0.90.0080.00615.27
7.0.80.0050.00815.43
7.0.70.0030.00615.18
7.0.60.0060.03316.82
7.0.50.0020.02116.29
7.0.40.0070.03115.68
7.0.30.0220.02315.71
7.0.20.0120.02215.65
7.0.10.0020.03615.68
7.0.00.0070.02315.58
5.6.380.0060.00514.30
5.6.370.0050.00914.16
5.6.360.0080.00514.52
5.6.350.0050.00814.68
5.6.340.0050.01014.55
5.6.330.0070.00914.40
5.6.320.0000.01314.23
5.6.310.0080.00614.59
5.6.300.0110.00314.33
5.6.290.0060.00714.32
5.6.280.0090.02516.54
5.6.270.0040.01114.49
5.6.260.0050.00714.21
5.6.250.0050.00714.58
5.6.240.0050.00914.43
5.6.230.0020.00714.28
5.6.220.0040.00914.29
5.6.210.0030.03016.41
5.6.200.0080.02215.44
5.6.190.0080.02816.22
5.6.180.0190.02916.32
5.6.170.0100.02216.42
5.6.160.0100.01916.37
5.6.150.0030.03215.60
5.6.140.0040.02515.59
5.6.130.0050.03215.56
5.6.120.0090.01916.49
5.6.110.0010.02316.52
5.6.100.0080.02716.49
5.6.90.0080.02816.48
5.6.80.0080.02716.31
5.6.70.0050.00714.31
5.6.60.0080.00514.34
5.6.50.0040.01114.33
5.6.40.0020.01414.28
5.6.30.0060.00814.25
5.6.20.0050.00814.11
5.6.10.0000.01314.06
5.6.00.0100.00214.27
5.5.380.0050.00311.14
5.5.370.0040.00711.03
5.5.360.0000.01011.26
5.5.350.1300.01814.33
5.5.340.0070.02713.40
5.5.330.0060.03113.98
5.5.320.0030.03014.29
5.5.310.0140.02714.23
5.5.300.0100.02713.44
5.5.290.0050.03113.49
5.5.280.0010.03214.55
5.5.270.0040.02014.40
5.5.260.0080.02614.21
5.5.250.0070.02414.23
5.5.240.0070.03314.20
5.5.230.0020.00711.09
5.5.220.0040.00711.07
5.5.210.0050.00611.25
5.5.200.0060.00311.04
5.5.190.0050.00511.14
5.5.180.0060.00310.90
5.5.170.0050.00511.18
5.5.160.0040.00611.08
5.5.150.0060.00511.26
5.5.140.0040.00610.93
5.5.130.0070.00411.19
5.5.120.0000.01011.15
5.5.110.0060.00211.16
5.5.100.0020.00611.31
5.5.90.0030.00911.24
5.5.80.0070.00611.00
5.5.70.0050.00511.27
5.5.60.0050.00511.13
5.5.50.0010.00911.13
5.5.40.0040.00511.01
5.5.30.0060.00511.11
5.5.20.0020.01010.74
5.5.10.0050.00611.03
5.5.00.0060.00611.09
5.4.450.0160.01713.90
5.4.440.0160.01114.04
5.4.430.0180.02013.93
5.4.420.0160.02513.83
5.4.410.0140.02413.69
5.4.400.0210.01913.70
5.4.390.0130.02613.51
5.4.380.0180.01713.70
5.4.370.0180.01713.62
5.4.360.0220.02413.70
5.4.350.0190.02013.54
5.4.340.0200.01813.70
5.4.330.0030.00711.10
5.4.320.0200.01813.65
5.4.310.0220.01913.72
5.4.300.0160.01713.53
5.4.290.0150.02013.62
5.4.280.0150.01813.56
5.4.270.0210.02413.51
5.4.260.0210.02313.62
5.4.250.0180.02713.53
5.4.240.0180.01713.70
5.4.230.0180.02313.66
5.4.220.0110.01613.59
5.4.210.0110.01913.54
5.4.200.0170.01613.67
5.4.190.0190.02713.62
5.4.180.0180.02213.78
5.4.170.0190.02613.44
5.4.160.0200.01513.74
5.4.150.0140.01813.66
5.4.140.0170.01512.75
5.4.130.0140.01812.69
5.4.120.0170.02712.92
5.4.110.0200.02312.79
5.4.100.0210.02612.90
5.4.90.0200.02312.69
5.4.80.0190.01712.80
5.4.70.0220.02112.84
5.4.60.0180.02812.83
5.4.50.0200.01912.78
5.4.40.0240.02412.90
5.4.30.0200.02112.75
5.4.20.0160.01312.86
5.4.10.0180.01912.88
5.4.00.0170.01912.75
5.3.290.0180.01812.05
5.3.280.0170.02611.82
5.3.270.0230.01811.84
5.3.260.0190.02711.81
5.3.250.0230.02411.82
5.3.240.0150.01911.77
5.3.230.0270.01711.80
5.3.220.0210.02311.82
5.3.210.0190.01811.84
5.3.200.0230.01811.74
5.3.190.0170.02811.90
5.3.180.0180.01612.00
5.3.170.0130.01812.00
5.3.160.0140.02212.05
5.3.150.0190.01812.07
5.3.140.0210.02311.94
5.3.130.0160.02511.98
5.3.120.0160.01811.96
5.3.110.0150.01811.91
5.3.100.0140.01311.80
5.3.90.0160.01511.80
5.3.80.0170.01311.56
5.3.70.0150.01511.61
5.3.60.0160.01411.59
5.3.50.0150.01611.72
5.3.40.0180.02011.61
5.3.30.0170.01511.52
5.3.20.0150.01711.53
5.3.10.0140.01711.40
5.3.00.0140.01611.38
5.2.170.0120.01310.23
5.2.160.0120.02010.21
5.2.150.0170.02010.21
5.2.140.0120.01110.21
5.2.130.0120.01810.20
5.2.120.0130.02210.20
5.2.110.0150.02110.19
5.2.100.0090.01610.20
5.2.90.0160.01310.21
5.2.80.0150.02110.20
5.2.70.0130.01810.30
5.2.60.0140.01110.24
5.2.50.0160.02210.17
5.2.40.0110.01610.21
5.2.30.0080.01510.15
5.2.20.0100.01710.15
5.2.10.0100.01310.15
5.2.00.0110.01110.10
5.1.60.0100.0119.85
5.1.50.0100.0139.85
5.1.40.0100.0109.89
5.1.30.0090.0119.98
5.1.20.0110.0129.95
5.1.10.0060.0129.88
5.1.00.0150.0089.88
5.0.50.0070.0089.43
5.0.40.0060.0119.30
5.0.30.0050.0149.29
5.0.20.0070.0089.29
5.0.10.0080.0069.23
5.0.00.0050.0149.22
4.4.90.0090.0108.95
4.4.80.0060.0078.95
4.4.70.0040.0088.95
4.4.60.0060.0078.95
4.4.50.0070.0058.95
4.4.40.0060.0128.95
4.4.30.0060.0078.95
4.4.20.0040.0098.95
4.4.10.0040.0108.95
4.4.00.0060.0118.95
4.3.110.0040.0108.95
4.3.100.0040.0098.95
4.3.90.0070.0068.95
4.3.80.0060.0118.95
4.3.70.0040.0088.95
4.3.60.0040.0098.95
4.3.50.0030.0158.95
4.3.40.0080.0168.95
4.3.30.0020.0088.95
4.3.20.0020.0108.95
4.3.10.0010.0108.95
4.3.00.0030.0098.95

preferences:
48.6 ms | 401 KiB | 5 Q