3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phrases = array("NEW YORK NY", "NEW JERSEY", "SOUTH DAKOTA", "SOUTH CAROLINA", "COMPUTER REPAIR TECH","YORK NY","07728","WYOMING MI","WYOMING MINNESOTA"); $string = ("I live in wyoming Minnesota, but used to live in New Jersey 07728 working as a computer repair tech."); $string = strtoupper($string); $matches = stringSearch($phrases, $string); var_dump($matches); function stringSearch($phrases, $string){ $phrases1 = trim(implode('|', $phrases)); $phrases1 = str_replace(' ', '\s', $phrases1); preg_match_all("/$phrases1/s", $string, $matches); $value = implode(' ', array_filter($matches[0])); echo $value; }

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.0060.00918.62
8.3.50.0180.00222.11
8.3.40.0220.00018.93
8.3.30.0090.00618.84
8.3.20.0050.00318.88
8.3.10.0080.00020.69
8.3.00.0060.00321.73
8.2.180.0090.01216.88
8.2.170.0160.00322.96
8.2.160.0070.00720.35
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0080.00019.74
8.2.110.0030.00621.01
8.2.100.0060.00617.97
8.2.90.0060.00318.22
8.2.80.0040.00418.09
8.2.70.0000.00817.75
8.2.60.0050.00317.88
8.2.50.0040.00417.88
8.2.40.0030.00519.72
8.2.30.0080.00019.92
8.2.20.0000.00718.01
8.2.10.0040.00417.98
8.2.00.0000.00817.93
8.1.280.0120.00325.92
8.1.270.0090.00023.99
8.1.260.0090.00626.35
8.1.250.0000.00828.09
8.1.240.0030.00623.98
8.1.230.0070.00422.68
8.1.220.0040.00417.80
8.1.210.0060.00318.91
8.1.200.0060.00317.36
8.1.190.0030.00517.35
8.1.180.0050.00318.10
8.1.170.0050.00218.97
8.1.160.0040.00418.88
8.1.150.0040.00418.77
8.1.140.0030.00517.61
8.1.130.0040.00417.83
8.1.120.0040.00417.52
8.1.110.0040.00417.54
8.1.100.0050.00217.55
8.1.90.0030.00617.66
8.1.80.0030.00517.63
8.1.70.0030.00317.42
8.1.60.0030.00717.66
8.1.50.0000.00817.63
8.1.40.0000.00817.77
8.1.30.0030.00717.81
8.1.20.0000.00817.66
8.1.10.0000.00817.75
8.1.00.0000.00717.70
8.0.300.0000.00720.16
8.0.290.0040.00417.00
8.0.280.0000.00818.37
8.0.270.0050.00217.24
8.0.260.0000.00817.02
8.0.250.0040.00417.01
8.0.240.0030.00617.11
8.0.230.0070.00017.14
8.0.220.0040.00417.05
8.0.210.0030.00317.02
8.0.200.0030.00817.01
8.0.190.0070.00017.06
8.0.180.0070.00017.11
8.0.170.0070.00016.99
8.0.160.0050.00317.11
8.0.150.0040.00417.02
8.0.140.0040.00716.99
8.0.130.0030.00613.53
8.0.120.0030.00516.92
8.0.110.0000.00916.89
8.0.100.0000.00717.02
8.0.90.0050.00316.88
8.0.80.0060.00917.04
8.0.70.0000.00817.18
8.0.60.0070.00016.91
8.0.50.0080.00016.89
8.0.30.0140.00617.15
8.0.20.0110.00717.40
8.0.10.0050.00216.98
8.0.00.0090.01417.14
7.4.330.0000.00514.87
7.4.320.0050.00316.65
7.4.300.0060.00016.84
7.4.290.0030.00316.73
7.4.280.0040.00416.81
7.4.270.0030.00516.72
7.4.260.0030.00313.48
7.4.250.0030.00616.63
7.4.240.0070.00016.89
7.4.230.0040.00416.63
7.4.220.0080.00816.63
7.4.210.0040.01116.78
7.4.200.0000.00716.91
7.4.190.0000.00716.91
7.4.160.0130.00316.79
7.4.150.0090.00917.40
7.4.140.0100.01217.86
7.4.130.0080.01016.74
7.4.120.0070.01016.68
7.4.110.0130.00316.96
7.4.100.0110.00616.73
7.4.90.0180.00616.66
7.4.80.0120.00319.37
7.4.70.0100.00716.81
7.4.60.0100.00816.69
7.4.50.0000.00916.72
7.4.40.0060.00922.27
7.4.30.0120.01216.86
7.4.00.0040.01214.93
7.3.330.0060.00013.47
7.3.320.0050.00013.51
7.3.310.0000.00716.51
7.3.300.0070.00016.53
7.3.290.0070.01316.60
7.3.280.0070.00916.54
7.3.270.0080.01217.40
7.3.260.0020.01618.24
7.3.250.0100.00716.52
7.3.240.0050.01116.59
7.3.230.0030.01316.45
7.3.210.0130.00416.44
7.3.200.0090.01319.39
7.3.190.0060.01216.77
7.3.180.0160.00016.80
7.3.170.0060.01516.88
7.3.160.0140.00716.66
7.3.120.0100.00715.36
7.2.330.0060.01116.84
7.2.320.0070.01316.67
7.2.310.0100.01316.84
7.2.300.0130.00416.81
7.2.290.0130.00316.76
7.2.60.0070.01016.79
7.2.00.0130.00319.83
7.1.200.0100.00316.12
7.1.100.0030.01318.12
7.1.70.0040.00717.43
7.1.60.0130.00619.40
7.1.50.0100.01317.24
7.1.00.0030.07022.46
7.0.200.0000.00916.60
7.0.140.0000.07322.10
7.0.60.0130.07719.92
7.0.50.0070.06317.99
7.0.40.0100.05717.79
7.0.30.0070.08317.73
7.0.20.0070.06017.75
7.0.10.0070.05017.87
7.0.00.0100.08017.70
5.6.280.0100.06721.09
5.6.210.0200.06720.55
5.6.200.0100.07718.18
5.6.190.0000.04718.18
5.6.180.0030.04318.15
5.6.170.0100.06318.23
5.6.160.0100.06018.23
5.6.150.0030.05718.19
5.6.140.0030.04018.14
5.6.130.0030.05718.18
5.6.120.0030.05718.23
5.6.110.0070.04318.13
5.6.100.0100.08018.14
5.6.90.0070.04018.14
5.6.80.0030.08017.70
5.6.70.0100.05017.66
5.6.60.0030.04317.55
5.6.50.0100.06017.54
5.6.40.0000.06017.51
5.6.30.0070.06317.59
5.6.20.0170.05017.50
5.6.10.0030.06717.48
5.6.00.0070.06717.53
5.5.350.0270.06320.44
5.5.340.0070.08018.09
5.5.330.0030.05318.09
5.5.320.0100.04017.99
5.5.310.0100.07718.10
5.5.300.0030.05017.98
5.5.290.0070.04018.07
5.5.280.0070.06017.92
5.5.270.0100.08317.91
5.5.260.0070.05017.92
5.5.250.0030.04317.86
5.5.240.0000.07317.34
5.5.230.0030.04317.32
5.5.220.0130.03017.30
5.5.210.0130.07717.41
5.5.200.0070.04317.28
5.5.190.0100.07717.30
5.5.180.0030.07317.29
5.5.160.0070.08317.34
5.5.150.0070.05017.43
5.5.140.0070.06017.39
5.5.130.0000.05017.34
5.5.120.0070.06317.30
5.5.110.0100.07017.29
5.5.100.0070.07017.21
5.5.90.0100.04717.35
5.5.80.0130.04717.24
5.5.70.0000.06017.19
5.5.60.0070.03717.27
5.5.50.0030.06017.33
5.5.40.0000.05317.18
5.5.30.0070.03717.25
5.5.20.0170.06717.21
5.5.10.0000.04317.21
5.5.00.0070.07317.20
5.4.450.0100.06319.38
5.4.440.0130.04319.47
5.4.430.0100.06019.28
5.4.420.0070.04319.34
5.4.410.0070.04019.33
5.4.400.0170.06718.89
5.4.390.0030.04318.89
5.4.380.0100.06719.02
5.4.370.0070.06019.01
5.4.360.0170.04019.01
5.4.350.0100.08019.05
5.4.340.0170.06719.27
5.4.320.0130.07019.28
5.4.310.0070.04719.05
5.4.300.0030.04019.03
5.4.290.0070.06319.05
5.4.280.0070.07718.88
5.4.270.0030.08319.09
5.4.260.0030.08319.11
5.4.250.0030.06319.09
5.4.240.0030.06719.06
5.4.230.0070.07019.13
5.4.220.0100.07318.95
5.4.210.0070.04319.02
5.4.200.0100.06719.02
5.4.190.0030.04318.98
5.4.180.0100.04319.03
5.4.170.0130.04019.26
5.4.160.0100.05719.09
5.4.150.0170.05319.25
5.4.140.0030.05016.54
5.4.130.0030.05016.29
5.4.120.0030.04316.48
5.4.110.0070.03716.43
5.4.100.0130.06016.43
5.4.90.0030.03716.35
5.4.80.0030.05716.45
5.4.70.0030.06316.42
5.4.60.0070.07016.46
5.4.50.0030.06316.56
5.4.40.0170.06016.38
5.4.30.0030.07016.45
5.4.20.0030.07316.45
5.4.10.0100.04716.37
5.4.00.0130.06315.85
5.3.290.0130.07314.68
5.3.280.0070.07714.61
5.3.270.0230.05314.64
5.3.260.0130.05714.60
5.3.250.0070.07014.60
5.3.240.0170.05714.66
5.3.230.0100.03714.65
5.3.220.0100.03314.59
5.3.210.0000.06014.62
5.3.200.0000.06014.79
5.3.190.0100.04314.62
5.3.180.0070.04014.42
5.3.170.0070.06314.60
5.3.160.0100.07014.56
5.3.150.0070.05714.60
5.3.140.0070.04314.60
5.3.130.0030.06714.58
5.3.120.0070.05314.56
5.3.110.0070.08014.64
5.3.100.0070.07714.25
5.3.90.0100.07013.98
5.3.80.0070.06014.00
5.3.70.0100.07314.03
5.3.60.0100.06014.09
5.3.50.0030.06013.84
5.3.40.0100.07313.93
5.3.30.0070.05713.97
5.3.20.0070.04313.79
5.3.10.0070.06313.67
5.3.00.0070.06013.63
5.2.170.0130.05711.16
5.2.160.0030.05711.11
5.2.150.0030.06011.13
5.2.140.0000.04711.18
5.2.130.0070.05711.20
5.2.120.0100.05011.12
5.2.110.0030.06011.17
5.2.100.0070.06011.32
5.2.90.0100.06011.14
5.2.80.0070.06011.19
5.2.70.0000.06711.09
5.2.60.0030.07010.95
5.2.50.0000.06311.23
5.2.40.0100.05711.05
5.2.30.0070.06010.86
5.2.20.0000.03311.03
5.2.10.0000.06710.85
5.2.00.0100.05310.71
5.1.60.0070.0479.91
5.1.50.0030.0509.98
5.1.40.0070.0539.95
5.1.30.0030.05310.41
5.1.20.0070.05710.38
5.1.10.0100.02710.12
5.1.00.0100.04710.18
5.0.50.0000.0338.49
5.0.40.0000.0478.32
5.0.30.0030.0478.14
5.0.20.0000.0278.27
5.0.10.0000.0438.16
5.0.00.0030.0507.99
4.4.90.0000.0407.93
4.4.80.0030.0207.93
4.4.70.0000.0377.93
4.4.60.0030.0377.93
4.4.50.0030.0277.93
4.4.40.0030.0477.93
4.4.30.0030.0307.93
4.4.20.0030.0237.93
4.4.10.0000.0307.93
4.4.00.0030.0537.93
4.3.110.0070.0277.93
4.3.100.0070.0207.93
4.3.90.0000.0237.93
4.3.80.0000.0377.93
4.3.70.0030.0377.93
4.3.60.0030.0337.93
4.3.50.0030.0177.93
4.3.40.0030.0437.93
4.3.30.0030.0377.93
4.3.20.0070.0307.93
4.3.10.0100.0307.93
4.3.00.0000.0377.93

preferences:
43.6 ms | 400 KiB | 5 Q