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); 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.0110.01118.43
8.3.50.0240.00522.22
8.3.40.0140.00019.04
8.3.30.0090.00618.67
8.3.20.0040.00418.87
8.3.10.0050.00321.22
8.3.00.0000.00721.91
8.2.180.0040.01418.35
8.2.170.0140.00422.96
8.2.160.0000.01320.39
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00420.96
8.2.110.0100.00020.52
8.2.100.0040.00717.97
8.2.90.0040.00419.17
8.2.80.0050.00317.97
8.2.70.0080.00417.75
8.2.60.0080.00018.05
8.2.50.0050.00318.07
8.2.40.0040.00418.34
8.2.30.0000.00719.48
8.2.20.0070.00018.03
8.2.10.0040.00418.12
8.2.00.0000.00717.85
8.1.280.0140.00025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00720.71
8.1.230.0000.01120.85
8.1.220.0040.00418.77
8.1.210.0080.00018.84
8.1.200.0000.01017.34
8.1.190.0060.00317.29
8.1.180.0050.00318.10
8.1.170.0000.00818.73
8.1.160.0050.00218.88
8.1.150.0020.00518.74
8.1.140.0000.00817.47
8.1.130.0030.00317.98
8.1.120.0000.00717.50
8.1.110.0040.00417.55
8.1.100.0070.00017.46
8.1.90.0040.00417.47
8.1.80.0000.00817.58
8.1.70.0070.00017.45
8.1.60.0040.00417.77
8.1.50.0020.00517.68
8.1.40.0030.00517.59
8.1.30.0000.00817.71
8.1.20.0000.00817.72
8.1.10.0040.00417.76
8.1.00.0040.00417.67
8.0.300.0000.00720.10
8.0.290.0000.00717.30
8.0.280.0030.00318.55
8.0.270.0040.00417.26
8.0.260.0030.00318.41
8.0.250.0000.01017.14
8.0.240.0000.00717.18
8.0.230.0000.00717.00
8.0.220.0000.00717.08
8.0.210.0000.00716.99
8.0.200.0040.00417.14
8.0.190.0070.00017.21
8.0.180.0070.00017.02
8.0.170.0000.00816.96
8.0.160.0000.00717.07
8.0.150.0080.00017.05
8.0.140.0030.00616.91
8.0.130.0000.00713.48
8.0.120.0040.00417.01
8.0.110.0050.00216.89
8.0.100.0040.00416.88
8.0.90.0070.00017.10
8.0.80.0040.01817.04
8.0.70.0040.00416.99
8.0.60.0000.00717.11
8.0.50.0030.00517.01
8.0.30.0100.01017.42
8.0.20.0170.00517.40
8.0.10.0050.00317.19
8.0.00.0050.01516.90
7.4.330.0050.00016.76
7.4.320.0000.00716.74
7.4.300.0000.00816.86
7.4.290.0030.00316.64
7.4.280.0040.00416.67
7.4.270.0000.00816.87
7.4.260.0030.00313.54
7.4.250.0080.00016.80
7.4.240.0000.00816.83
7.4.230.0020.00516.63
7.4.220.0070.01416.80
7.4.210.0090.00816.80
7.4.200.0000.00716.84
7.4.190.0040.00416.92
7.4.160.0120.00416.70
7.4.150.0040.01317.40
7.4.140.0170.00517.86
7.4.130.0100.00916.67
7.4.120.0070.00916.69
7.4.110.0140.00716.79
7.4.100.0110.00716.48
7.4.90.0100.01016.66
7.4.80.0120.00619.39
7.4.70.0070.01016.68
7.4.60.0080.00816.75
7.4.50.0040.00416.67
7.4.40.0060.01022.77
7.4.30.0030.01316.68
7.4.10.0100.00715.24
7.4.00.0070.00815.20
7.3.330.0000.00713.54
7.3.320.0000.00513.46
7.3.310.0040.00416.63
7.3.300.0040.00416.49
7.3.290.0100.00316.54
7.3.280.0090.00716.48
7.3.270.0060.01117.40
7.3.260.0120.00718.24
7.3.250.0120.00716.62
7.3.240.0100.00716.70
7.3.230.0150.00316.50
7.3.210.0060.01316.50
7.3.200.0130.00419.39
7.3.190.0170.00016.88
7.3.180.0140.00316.70
7.3.170.0030.01716.42
7.3.160.0150.00016.77
7.3.130.0080.00715.23
7.3.120.0040.01214.99
7.3.110.0140.00414.74
7.3.100.0070.01014.74
7.3.90.0070.00714.93
7.3.80.0040.01114.75
7.3.70.0050.00514.99
7.3.60.0000.01515.12
7.3.50.0040.01115.00
7.3.40.0090.00615.08
7.3.30.0100.00615.03
7.3.20.0000.01517.00
7.3.10.0060.00916.83
7.3.00.0030.00617.07
7.2.330.0040.01416.64
7.2.320.0070.01016.82
7.2.310.0090.01216.95
7.2.300.0120.00916.80
7.2.290.0030.01516.79
7.2.260.0100.01015.48
7.2.250.0150.00415.25
7.2.240.0070.00715.14
7.2.230.0040.00815.10
7.2.220.0060.00915.40
7.2.210.0150.00315.30
7.2.200.0030.01415.02
7.2.190.0060.00814.95
7.2.180.0070.00315.24
7.2.170.0070.01015.37
7.2.160.0060.00915.18
7.2.150.0060.01217.07
7.2.140.0050.00517.20
7.2.130.0030.01116.89
7.2.120.0070.01117.13
7.2.110.0040.01417.24
7.2.100.0000.01417.04
7.2.90.0100.00317.08
7.2.80.0000.01216.98
7.2.70.0070.00717.04
7.2.60.0080.00817.18
7.2.50.0040.01117.03
7.2.40.0030.00917.29
7.2.30.0070.01016.98
7.2.20.0070.01117.07
7.2.10.0050.00516.87
7.2.00.0100.00618.32
7.1.330.0090.00416.23
7.1.320.0040.00715.91
7.1.310.0070.00716.20
7.1.300.0040.00416.03
7.1.290.0000.01215.93
7.1.280.0000.00915.90
7.1.270.0000.00916.12
7.1.260.0060.00916.10
7.1.250.0030.01015.82
7.1.240.0100.00316.17
7.1.230.0000.01316.07
7.1.220.0040.01215.86
7.1.210.0030.00616.04
7.1.200.0080.00415.86
7.1.190.0070.01115.86
7.1.180.0140.00316.19
7.1.170.0100.00015.87
7.1.160.0000.01516.09
7.1.150.0090.00916.06
7.1.140.0050.00515.74
7.1.130.0070.00716.18
7.1.120.0100.00315.87
7.1.110.0030.00915.97
7.1.100.0020.01317.27
7.1.90.0000.01116.22
7.1.80.0070.00716.07
7.1.70.0050.00816.68
7.1.60.0060.01117.66
7.1.50.0120.01025.35
7.1.40.0100.00315.81
7.1.30.0000.00915.64
7.1.20.0000.01515.99
7.1.10.0000.01015.98
7.1.00.0080.03219.23
7.0.330.0030.00615.37
7.0.320.0070.01015.58
7.0.310.0060.00615.39
7.0.300.0030.00615.65
7.0.290.0080.00815.74
7.0.280.0090.00615.46
7.0.270.0100.00015.53
7.0.260.0070.00715.64
7.0.250.0050.00515.78
7.0.240.0030.00615.61
7.0.230.0070.00715.78
7.0.220.0000.01015.23
7.0.210.0100.00015.46
7.0.200.0060.00316.25
7.0.190.0030.00915.38
7.0.180.0100.00315.64
7.0.170.0050.00315.77
7.0.160.0060.00615.67
7.0.150.0110.00415.75
7.0.140.0090.03518.92
7.0.130.0030.01315.58
7.0.120.0040.00815.64
7.0.110.0000.01315.46
7.0.100.0040.00715.54
7.0.90.0100.01015.74
7.0.80.0060.00615.84
7.0.70.0000.04818.76
7.0.60.0070.03018.74
7.0.50.0020.04418.94
7.0.40.0080.04016.78
7.0.30.0050.04116.77
7.0.20.0090.02716.82
7.0.10.0020.04716.88
7.0.00.0070.04116.81
5.6.400.0030.00714.70
5.6.390.0060.00914.49
5.6.380.0070.01014.48
5.6.370.0000.01314.28
5.6.360.0100.00014.31
5.6.350.0060.00614.71
5.6.340.0060.00814.71
5.6.330.0030.01314.42
5.6.320.0050.00514.48
5.6.310.0000.01314.73
5.6.300.0090.00614.46
5.6.290.0070.00714.28
5.6.280.0020.04117.82
5.6.270.0060.00614.25
5.6.260.0060.00614.33
5.6.250.0040.01214.36
5.6.240.0090.00314.63
5.6.230.0060.00314.82
5.6.220.0030.04017.66
5.6.210.0030.03117.50
5.6.200.0020.04717.84
5.6.190.0050.03517.64
5.6.180.0080.04117.82
5.6.170.0030.03717.83
5.6.160.0050.03117.59
5.6.150.0030.04317.81
5.6.140.0050.04317.74
5.6.130.0020.04317.98
5.6.120.0050.04417.73
5.6.110.0030.04717.66
5.6.100.0020.04717.60
5.6.90.0050.03517.93
5.6.80.0050.04217.49
5.6.70.0080.03517.45
5.6.60.0030.04117.36
5.6.50.0050.04217.45
5.6.40.0120.03817.44
5.6.30.0070.03317.55
5.6.20.0050.04017.46
5.6.10.0110.03617.39
5.6.00.0050.02817.48
5.5.380.0130.00714.23
5.5.370.0030.00614.40
5.5.360.0030.04517.54
5.5.350.0120.04017.55
5.5.340.0050.03017.53
5.5.330.0030.03717.63
5.5.320.0050.04017.56
5.5.310.0100.04017.66
5.5.300.0050.04417.64
5.5.290.0080.04017.76
5.5.280.0020.04717.70
5.5.270.0070.04317.66
5.5.260.0050.04317.46
5.5.250.0070.04317.57
5.5.240.0080.03817.27
5.5.230.0050.03817.25
5.5.220.0080.04017.08
5.5.210.0040.03717.33
5.5.200.0000.04917.11
5.5.190.0070.03817.34
5.5.180.0020.04717.17
5.5.170.0060.00914.21
5.5.160.0070.03917.22
5.5.150.0000.04717.14
5.5.140.0110.03817.20
5.5.130.0030.03217.38
5.5.120.0050.03917.17
5.5.110.0050.03217.26
5.5.100.0010.04417.25
5.5.90.0020.03917.18
5.5.80.0070.03517.29
5.5.70.0070.04317.24
5.5.60.0100.03417.11
5.5.50.0070.04017.12
5.5.40.0050.04217.29
5.5.30.0020.04517.12
5.5.20.0020.04017.22
5.5.10.0070.04717.34
5.5.00.0030.04217.21
5.4.450.0020.04315.71
5.4.440.0030.04315.63
5.4.430.0020.04315.64
5.4.420.0080.03815.76
5.4.410.0050.03815.65
5.4.400.0070.03415.49
5.4.390.0020.04515.48
5.4.380.0050.03715.56
5.4.370.0100.03215.55
5.4.360.0020.03815.55
5.4.350.0050.04215.47
5.4.340.0020.04215.55
5.4.330.0000.01312.07
5.4.320.0050.03815.59
5.4.310.0080.03515.47
5.4.300.0060.03715.58
5.4.290.0080.03515.47
5.4.280.0080.02815.55
5.4.270.0070.03415.62
5.4.260.0070.03815.56
5.4.250.0110.03315.47
5.4.240.0020.04015.54
5.4.230.0050.04015.54
5.4.220.0050.03815.57
5.4.210.0050.03715.47
5.4.200.0040.03915.59
5.4.190.0020.04515.57
5.4.180.0110.03515.50
5.4.170.0030.03315.54
5.4.160.0000.04415.59
5.4.150.0050.04015.58
5.4.140.0030.03014.27
5.4.130.0060.01614.18
5.4.120.0020.02014.27
5.4.110.0000.02314.28
5.4.100.0000.02114.26
5.4.90.0050.02014.30
5.4.80.0000.02314.24
5.4.70.0020.02214.30
5.4.60.0020.01914.24
5.4.50.0030.01614.19
5.4.40.0000.02314.23
5.4.30.0030.01814.27
5.4.20.0020.02114.20
5.4.10.0020.01714.23
5.4.00.0040.01813.98
5.3.290.0050.03713.36
5.3.280.0070.03413.37
5.3.270.0100.03513.35
5.3.260.0030.03913.40
5.3.250.0020.03413.35
5.3.240.0020.03213.38
5.3.230.0050.03713.34
5.3.220.0030.02013.38
5.3.210.0060.02013.36
5.3.200.0000.02213.30
5.3.190.0080.01513.29
5.3.180.0020.02013.30
5.3.170.0050.01813.32
5.3.160.0020.02113.37
5.3.150.0030.01713.33
5.3.140.0010.02313.30
5.3.130.0050.01513.30
5.3.120.0000.02313.33
5.3.110.0010.01913.30
5.3.100.0040.02313.12
5.3.90.0050.02213.04
5.3.80.0000.02013.06
5.3.70.0010.02413.04
5.3.60.0030.01713.07
5.3.50.0050.01413.00
5.3.40.0000.01812.97
5.3.30.0040.01512.95
5.3.20.0000.01912.91
5.3.10.0040.01512.93
5.3.00.0000.02012.86
5.2.170.0000.03311.34
5.2.160.0000.03011.34
5.2.150.0030.02711.34
5.2.140.0000.03311.34
5.2.130.0030.02011.34
5.2.120.0070.01711.34
5.2.110.0000.02311.34
5.2.100.0030.02311.34
5.2.90.0000.02311.34
5.2.80.0000.02711.34
5.2.70.0000.02311.34
5.2.60.0000.03011.34
5.2.50.0000.02311.34
5.2.40.0000.02311.34
5.2.30.0000.02311.34
5.2.20.0070.01711.34
5.2.10.0000.02311.34
5.2.00.0000.02711.34
5.1.60.0000.02311.34
5.1.50.0030.01711.34
5.1.40.0030.01711.34
5.1.30.0000.02011.34
5.1.20.0000.02311.34
5.1.10.0030.02011.34
5.1.00.0000.02011.34
5.0.50.0000.02011.34
5.0.40.0000.01711.34
5.0.30.0030.02711.34
5.0.20.0000.01711.34
5.0.10.0000.01711.34
5.0.00.0000.02311.34
4.4.90.0030.01311.34
4.4.80.0000.01311.34
4.4.70.0000.01311.34
4.4.60.0030.01011.34
4.4.50.0000.01311.34
4.4.40.0000.02011.34
4.4.30.0000.01311.34
4.4.20.0000.01311.34
4.4.10.0000.01311.34
4.4.00.0000.02011.34
4.3.110.0030.01011.34
4.3.100.0000.01011.34
4.3.90.0000.01011.34
4.3.80.0000.02011.34
4.3.70.0000.01311.34
4.3.60.0000.01011.34
4.3.50.0000.01311.34
4.3.40.0000.02011.34
4.3.30.0000.01311.34
4.3.20.0030.01011.34
4.3.10.0000.01711.34
4.3.00.0000.01311.34

preferences:
55.49 ms | 401 KiB | 5 Q