3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "[Code][WST-2587] hello world WST-2589 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('/[(<\[]\s*((' . implode('|', $projects) . ')-[0-9]+)\s*[\]>)]/', $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.0120.00918.55
8.3.50.0110.01116.48
8.3.40.0090.00919.11
8.3.30.0040.01119.00
8.3.20.0000.00820.20
8.3.10.0040.00423.46
8.3.00.0060.00319.12
8.2.180.0060.01616.63
8.2.170.0110.00322.96
8.2.160.0100.00322.39
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.10
8.2.110.0110.00022.35
8.2.100.0050.00517.84
8.2.90.0040.00418.00
8.2.80.0000.00818.91
8.2.70.0030.00918.05
8.2.60.0000.00818.28
8.2.50.0040.00419.41
8.2.40.0040.00419.43
8.2.30.0040.00419.41
8.2.20.0040.00417.95
8.2.10.0090.00018.06
8.2.00.0040.00417.88
8.1.280.0110.01125.92
8.1.270.0080.00024.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00919.26
8.1.230.0040.00821.04
8.1.220.0030.00617.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0080.00017.23
8.1.180.0000.00818.86
8.1.170.0040.00718.79
8.1.160.0000.00719.09
8.1.150.0050.00218.97
8.1.140.0040.00417.65
8.1.130.0040.00417.73
8.1.120.0070.00017.59
8.1.110.0040.00417.52
8.1.100.0040.00417.56
8.1.90.0040.00417.62
8.1.80.0040.00417.60
8.1.70.0000.00717.50
8.1.60.0040.00417.62
8.1.50.0080.00017.60
8.1.40.0000.00817.56
8.1.30.0030.00517.75
8.1.20.0000.00817.86
8.1.10.0050.00317.76
8.1.00.0030.00617.67
8.0.300.0000.00818.77
8.0.290.0030.00616.88
8.0.280.0040.00418.40
8.0.270.0040.00417.28
8.0.260.0030.00317.28
8.0.250.0000.00717.13
8.0.240.0000.00717.16
8.0.230.0000.00817.00
8.0.220.0000.00717.02
8.0.210.0020.00516.93
8.0.200.0000.00717.02
8.0.190.0050.00317.13
8.0.180.0000.00816.96
8.0.170.0030.00617.00
8.0.160.0030.00617.01
8.0.150.0040.00417.07
8.0.140.0040.00416.93
8.0.130.0000.00613.51
8.0.120.0000.00916.99
8.0.110.0040.00417.01
8.0.100.0000.00816.97
8.0.90.0050.00316.95
8.0.80.0120.00917.04
8.0.70.0000.00717.04
8.0.60.0030.00516.91
8.0.50.0020.00517.11
8.0.30.0150.01017.19
8.0.20.0110.00817.40
8.0.10.0000.00717.11
8.0.00.0120.00716.87
7.4.330.0000.00515.03
7.4.320.0070.00016.73
7.4.300.0060.00016.79
7.4.290.0040.00416.86
7.4.280.0080.00016.74
7.4.270.0030.00316.58
7.4.260.0000.00716.80
7.4.250.0030.00516.64
7.4.240.0050.00216.74
7.4.230.0000.00816.47
7.4.220.0160.01016.82
7.4.210.0120.00316.81
7.4.200.0030.00316.56
7.4.160.0080.00816.51
7.4.150.0130.00717.40
7.4.140.0080.01317.86
7.4.130.0120.00516.74
7.4.120.0080.01216.75
7.4.110.0080.01216.72
7.4.100.0090.01216.62
7.4.90.0130.00316.66
7.4.80.0140.00419.39
7.4.70.0030.01516.59
7.4.60.0140.00316.48
7.4.50.0040.00016.58
7.4.40.0040.01316.86
7.4.30.0060.01016.91
7.4.00.0000.01715.10
7.3.330.0030.00313.31
7.3.320.0030.00313.23
7.3.310.0040.00416.52
7.3.300.0030.00316.39
7.3.290.0130.00416.40
7.3.280.0050.01516.45
7.3.270.0090.00917.40
7.3.260.0060.01316.66
7.3.250.0100.01016.52
7.3.240.0060.01016.54
7.3.230.0170.00016.80
7.3.210.0070.01016.48
7.3.200.0090.00919.39
7.3.190.0090.00616.39
7.3.180.0060.01016.51
7.3.170.0140.00316.60
7.3.160.0130.00316.61
7.2.330.0120.00616.88
7.2.320.0040.01516.91
7.2.310.0090.00916.91
7.2.300.0030.01416.88
7.2.290.0100.01316.94
7.2.60.0070.00717.25
7.2.00.0000.01319.34
7.1.200.0100.00015.63
7.1.100.0040.01218.17
7.1.70.0000.01517.32
7.1.60.0110.01419.22
7.1.50.0230.00735.07
7.1.00.0000.07722.31
7.0.200.0030.00917.11
7.0.140.0030.07721.96
7.0.60.0100.03719.92
7.0.50.0030.05317.81
7.0.40.0100.04020.25
7.0.30.0270.06020.02
7.0.20.0130.04320.05
7.0.10.0100.06320.13
7.0.00.0030.08720.11
5.6.280.0100.06720.78
5.6.210.0070.06020.61
5.6.200.0100.08018.17
5.6.190.0070.04320.45
5.6.180.0370.04020.60
5.6.170.0270.04020.52
5.6.160.0100.04720.32
5.6.150.0100.03018.17
5.6.140.0130.04018.21
5.6.130.0100.08018.20
5.6.120.0030.04020.98
5.6.110.0070.07321.10
5.6.100.0100.08321.14
5.6.90.0230.06020.98
5.6.80.0100.05020.49
5.5.350.0270.08020.47
5.5.340.0000.08717.97
5.5.330.0130.08020.28
5.5.320.0230.05720.24
5.5.310.0270.05020.27
5.5.300.0030.07017.93
5.5.290.0070.04017.91
5.5.280.0130.08020.97
5.5.270.0070.07020.74
5.5.260.0100.03320.88
5.5.250.0100.05720.64
5.5.240.0030.07020.27
5.4.450.0770.07319.25
5.4.440.0130.06319.49
5.4.430.0170.05319.61
5.4.420.0100.06019.19
5.4.410.0170.05019.37
5.4.400.0230.05319.17
5.4.390.0300.05718.60
5.4.380.0370.05718.74
5.4.370.0370.06318.68
5.4.360.0400.05318.66
5.4.350.0430.05318.54
5.4.340.0330.06718.62
5.4.320.0500.04718.60
5.4.310.0430.05318.64
5.4.300.0330.07018.74
5.4.290.0470.06018.61
5.4.280.0400.05018.58
5.4.270.0330.05318.67
5.4.260.0370.05318.66
5.4.250.0470.04718.68
5.4.240.0300.05318.77
5.4.230.0470.04018.68
5.4.220.0470.07318.62
5.4.210.0400.07318.67
5.4.200.0270.05316.63
5.4.190.0330.06018.46
5.4.180.0430.05018.66
5.4.170.0300.06018.60
5.4.160.0270.05718.47
5.4.150.0270.08318.48
5.4.140.0400.05016.30
5.4.130.0430.05716.33
5.4.120.0400.05316.33
5.4.110.0400.06716.17
5.4.100.0270.06716.18
5.4.90.0370.06016.18
5.4.80.0300.05016.16
5.4.70.0300.05316.11
5.4.60.0330.04316.13
5.4.50.0370.04016.32
5.4.40.0330.05016.29
5.4.30.0570.05316.19
5.4.20.0230.05716.17
5.4.10.0300.06016.12
5.4.00.0400.05015.77
5.3.290.0400.06014.73
5.3.280.0600.06014.59
5.3.270.0570.06014.55
5.3.260.0470.05314.61
5.3.250.0370.05314.52
5.3.240.0570.05714.69
5.3.230.0500.07014.60
5.3.220.0530.07314.64
5.3.210.0400.07714.57
5.3.200.0430.06014.55
5.3.190.0370.06314.61
5.3.180.0470.05014.60
5.3.170.0330.05714.55
5.3.160.0330.05014.51
5.3.150.0330.06014.56
5.3.140.0330.05714.54
5.3.130.0300.05714.55
5.3.120.0270.06314.52
5.3.110.0330.07014.54
5.3.100.0400.06014.02
5.3.90.0470.05314.01
5.3.80.0430.04714.02
5.3.70.0370.05314.00
5.3.60.0370.05714.00
5.3.50.0330.05713.94
5.3.40.0430.05013.96
5.3.30.0530.04714.02
5.3.20.0600.04313.70
5.3.10.0430.06313.59
5.3.00.0400.05713.63
5.2.170.0270.04711.19
5.2.160.0370.04011.37
5.2.150.0330.04011.21
5.2.140.0300.04711.21
5.2.130.0270.04011.08
5.2.120.0330.03311.09
5.2.110.0300.04011.25
5.2.100.0370.03711.11
5.2.90.0300.05011.17
5.2.80.0230.05011.10
5.2.70.0230.05711.13
5.2.60.0330.05311.09
5.2.50.0330.06311.07
5.2.40.0330.04710.96
5.2.30.0430.04710.97
5.2.20.0300.05311.20
5.2.10.0370.05310.92
5.2.00.0370.04310.76
5.1.60.0330.03710.12
5.1.50.0300.0309.96
5.1.40.0230.0409.99
5.1.30.0200.04310.35
5.1.20.0230.04310.43
5.1.10.0170.03710.12
5.1.00.0200.05010.11
5.0.50.0170.0238.59
5.0.40.0170.0308.50
5.0.30.0230.0408.35
5.0.20.0100.0408.25
5.0.10.0170.0308.37
5.0.00.0100.0578.21
4.4.90.0130.0235.93
4.4.80.0130.0205.93
4.4.70.0130.0275.91
4.4.60.0230.0235.94
4.4.50.0230.0235.92
4.4.40.0230.0335.88
4.4.30.0200.0235.88
4.4.20.0070.0275.95
4.4.10.0070.0276.03
4.4.00.0170.0335.95
4.3.110.0130.0305.86
4.3.100.0200.0235.83
4.3.90.0200.0235.89
4.3.80.0170.0435.93
4.3.70.0200.0235.89
4.3.60.0130.0275.81
4.3.50.0170.0305.80
4.3.40.0070.0505.79
4.3.30.0030.0275.23
4.3.20.0030.0275.23
4.3.10.0100.0235.23
4.3.00.0130.0307.30

preferences:
53 ms | 400 KiB | 5 Q