3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "[Code][WST-2587] hello world WST-2587 IC-111"; print($value); print("\n"); $trimPattern = '/^[”’"\'(<]*@?(.+?)[.”’"\'\,!?:;)>]*$/'; print($trimPattern); print("\n"); $projects = array('IC', 'WST'); $calloutPattern = "/^(?:" . implode('|', $projects) . ")-[0-9]+$/"; print($calloutPattern); print("\n"); $words = preg_split('/(\s+)/', $value); print "\nWords:\n"; foreach ($words as $word) { print($word); print("\n"); } preg_match_all('/[(<\[]((' . implode('|', $projects) . ')-[0-9]+)[\]>)]/', $value, $matches); print "\nMatches:\n"; foreach ($matches[1] as $match) { print($match); print("\n"); } //$words = array_merge($words, $matches[1]); $words = $words + $matches[1]; print "\nMerged Words:\n"; foreach ($words as $word) { print($word); print("\n"); }

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.0140.00718.40
8.3.50.0090.00922.04
8.3.40.0060.00919.09
8.3.30.0140.00719.23
8.3.20.0110.00420.31
8.3.10.0040.00423.57
8.3.00.0040.00419.19
8.2.180.0060.00916.63
8.2.170.0070.00722.96
8.2.160.0110.00422.21
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0140.00021.16
8.2.110.0000.00920.47
8.2.100.0060.00618.03
8.2.90.0080.00018.03
8.2.80.0050.00517.97
8.2.70.0040.00417.93
8.2.60.0060.00318.22
8.2.50.0030.00518.10
8.2.40.0020.00519.30
8.2.30.0030.00619.22
8.2.20.0040.00418.02
8.2.10.0040.00418.24
8.2.00.0070.00017.95
8.1.280.0100.01025.92
8.1.270.0060.00319.01
8.1.260.0040.01126.35
8.1.250.0080.00028.09
8.1.240.0000.00922.50
8.1.230.0040.00722.68
8.1.220.0040.00417.74
8.1.210.0030.00518.85
8.1.200.0070.00317.35
8.1.190.0040.00417.25
8.1.180.0060.00318.93
8.1.170.0000.00818.77
8.1.160.0030.00519.04
8.1.150.0060.00318.88
8.1.140.0070.00017.61
8.1.130.0030.00317.78
8.1.120.0030.00517.65
8.1.110.0040.00417.59
8.1.100.0000.00717.63
8.1.90.0020.00517.50
8.1.80.0040.00417.52
8.1.70.0000.00717.60
8.1.60.0090.00017.75
8.1.50.0080.00017.64
8.1.40.0030.00517.64
8.1.30.0030.00517.86
8.1.20.0040.00417.70
8.1.10.0090.00017.71
8.1.00.0100.00017.73
8.0.300.0060.00319.98
8.0.290.0040.00416.88
8.0.280.0000.00718.47
8.0.270.0000.00717.20
8.0.260.0000.00717.28
8.0.250.0070.00017.06
8.0.240.0040.00417.16
8.0.230.0030.00317.13
8.0.220.0070.00017.05
8.0.210.0080.00016.96
8.0.200.0070.00017.11
8.0.190.0000.00817.04
8.0.180.0030.00717.17
8.0.170.0000.00717.01
8.0.160.0040.00417.05
8.0.150.0070.00017.18
8.0.140.0080.00017.08
8.0.130.0000.00613.52
8.0.120.0050.00317.06
8.0.110.0070.00017.04
8.0.100.0000.00716.95
8.0.90.0000.00717.09
8.0.80.0130.00317.15
8.0.70.0000.00717.10
8.0.60.0030.00517.11
8.0.50.0000.00816.88
8.0.30.0130.00717.44
8.0.20.0100.00917.40
8.0.10.0030.00517.27
8.0.00.0120.00816.99
7.4.330.0000.00515.08
7.4.320.0000.00616.73
7.4.300.0000.00616.82
7.4.290.0070.00016.84
7.4.280.0030.00316.73
7.4.270.0000.00716.72
7.4.260.0070.00016.70
7.4.250.0030.00516.66
7.4.240.0020.00616.74
7.4.230.0030.00316.91
7.4.220.0060.01316.77
7.4.210.0130.00316.87
7.4.200.0000.00716.81
7.4.160.0040.01216.46
7.4.150.0150.01217.40
7.4.140.0130.00517.86
7.4.130.0120.00916.85
7.4.120.0120.00816.71
7.4.110.0100.01016.62
7.4.100.0130.01016.65
7.4.90.0120.00616.52
7.4.80.0060.01219.39
7.4.70.0030.01916.56
7.4.60.0070.01316.92
7.4.50.0030.00616.54
7.4.40.0000.01716.61
7.4.30.0060.01216.73
7.4.00.0080.00814.96
7.3.330.0030.00313.39
7.3.320.0000.00513.21
7.3.310.0030.00316.31
7.3.300.0040.00416.46
7.3.290.0080.00516.42
7.3.280.0110.01016.41
7.3.270.0080.00817.40
7.3.260.0120.00616.63
7.3.250.0090.00916.73
7.3.240.0160.00816.84
7.3.230.0120.00616.47
7.3.210.0070.01116.63
7.3.200.0090.00819.39
7.3.190.0110.00616.74
7.3.180.0110.00816.85
7.3.170.0030.01316.73
7.3.160.0090.00716.76
7.2.330.0030.01417.02
7.2.320.0150.00316.89
7.2.310.0090.00916.87
7.2.300.0070.01016.93
7.2.290.0120.00416.91
7.2.00.0070.00719.86
7.1.100.0090.00518.48
7.1.70.0180.00017.30
7.1.60.0040.00717.24
7.1.50.0220.00734.93
7.1.00.0070.07322.27
7.0.200.0040.01416.96
7.0.140.0030.07721.99
7.0.60.0000.04319.91
7.0.50.0000.05317.90
7.0.40.0070.08720.21
7.0.30.0230.04720.11
7.0.20.0330.05720.14
7.0.10.0130.08720.18
7.0.00.0000.05020.25
5.6.280.0030.07321.12
5.6.210.0070.07720.48
5.6.200.0100.08318.22
5.6.190.0030.04720.39
5.6.180.0000.08320.41
5.6.170.0270.06320.50
5.6.160.0130.07020.66
5.6.150.0030.05718.12
5.6.140.0070.08318.22
5.6.130.0100.07318.11
5.6.120.0100.07021.01
5.6.110.0030.04021.14
5.6.100.0100.04320.96
5.6.90.0100.09021.11
5.6.80.0270.06020.51
5.5.350.4270.03320.43
5.5.340.0030.05717.98
5.5.330.0030.05320.46
5.5.320.0170.04320.17
5.5.310.0270.07020.23
5.5.300.0030.04017.97
5.5.290.0000.04718.02
5.5.280.0070.05720.78
5.5.270.0030.04720.73
5.5.260.0070.05320.77
5.5.250.0170.06720.77
5.5.240.0900.06020.14
5.4.450.0300.05719.63
5.4.440.0930.06719.36
5.4.430.0170.04719.48
5.4.420.0700.06019.35
5.4.410.0800.05019.02
5.4.400.0530.06019.04
5.4.390.0170.05718.57
5.4.380.0230.05718.67
5.4.370.0230.04718.50
5.4.360.0230.04718.50
5.4.350.0230.05018.72
5.4.340.0230.05318.46
5.4.320.0370.06318.56
5.4.310.0330.04318.57
5.4.300.0230.05718.58
5.4.290.0230.05018.73
5.4.280.0130.06018.50
5.4.270.0300.05018.44
5.4.260.0170.05718.71
5.4.250.0400.03318.77
5.4.240.0130.06018.71
5.4.230.0200.05018.66
5.4.220.0300.04318.67
5.4.210.0130.06018.67
5.4.200.0130.05316.52
5.4.190.0170.05318.67
5.4.180.0170.05718.70
5.4.170.0170.05718.49
5.4.160.0270.04718.48
5.4.150.0200.05318.42
5.4.140.0300.04016.16
5.4.130.0300.04016.26
5.4.120.0170.05016.14
5.4.110.0200.04716.14
5.4.100.0130.05316.17
5.4.90.0230.04716.06
5.4.80.0130.05316.13
5.4.70.0170.05316.14
5.4.60.0130.05716.21
5.4.50.0200.05016.37
5.4.40.0170.05316.34
5.4.30.0200.04716.05
5.4.20.0130.05716.22
5.4.10.0100.06016.20
5.4.00.0230.04715.71
5.3.290.0270.07014.58
5.3.280.0200.05014.60
5.3.270.0270.07014.65
5.3.260.0230.07314.59
5.3.250.0330.04014.55
5.3.240.0230.04714.64
5.3.230.0100.06014.55
5.3.220.0170.06314.53
5.3.210.0200.05314.53
5.3.200.0170.05314.50
5.3.190.0100.06314.50
5.3.180.0130.05714.67
5.3.170.0230.07014.64
5.3.160.0270.06314.67
5.3.150.0300.05314.61
5.3.140.0170.05714.48
5.3.130.0330.04314.62
5.3.120.0170.05714.61
5.3.110.0230.05014.47
5.3.100.0130.05714.03
5.3.90.0370.05713.94
5.3.80.0230.05014.02
5.3.70.0270.04714.02
5.3.60.0130.06713.93
5.3.50.0200.05014.04
5.3.40.0230.04714.04
5.3.30.0200.05013.91
5.3.20.0230.04313.69
5.3.10.0170.05013.60
5.3.00.0200.05013.58
5.2.170.0130.04311.07
5.2.160.0200.03311.13
5.2.150.0100.04711.20
5.2.140.0070.05311.29
5.2.130.0130.04011.03
5.2.120.0070.04711.10
5.2.110.0200.03711.06
5.2.100.0130.04311.11
5.2.90.0330.03311.10
5.2.80.0200.03711.16
5.2.70.0200.03711.07
5.2.60.0130.04311.03
5.2.50.0170.05710.97
5.2.40.0270.04011.14
5.2.30.0070.05311.03
5.2.20.0130.04710.91
5.2.10.0200.03710.97
5.2.00.0170.03710.79
5.1.60.0100.03710.04
5.1.50.0130.04010.08
5.1.40.0130.0339.97
5.1.30.0200.03010.32
5.1.20.0070.04310.34
5.1.10.0100.03710.15
5.1.00.0170.04710.19
5.0.50.0170.0208.56
5.0.40.0130.0338.45
5.0.30.0030.0478.33
5.0.20.0070.0308.23
5.0.10.0070.0408.22
5.0.00.0130.0378.21
4.4.90.0100.0205.85
4.4.80.0070.0235.92
4.4.70.0030.0275.91
4.4.60.0070.0235.84
4.4.50.0070.0205.90
4.4.40.0130.0275.94
4.4.30.0030.0275.92
4.4.20.0070.0206.01
4.4.10.0030.0235.93
4.4.00.0070.0335.94
4.3.110.0070.0305.77
4.3.100.0130.0175.77
4.3.90.0000.0305.82
4.3.80.0030.0375.85
4.3.70.0070.0205.93
4.3.60.0100.0175.81
4.3.50.0030.0275.88
4.3.40.0100.0305.88
4.3.30.0070.0204.57
4.3.20.0030.0234.54
4.3.10.0000.0274.50
4.3.00.0130.0207.30

preferences:
61.41 ms | 401 KiB | 5 Q