3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "[Code][WST-2587] hello world"; 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 "Words:"; foreach ($words as $word) { print($word); print("\n"); } preg_match_all('/[(<\[]((' . implode('|', $projects) . ')-[0-9]+)[\]>)]/', $value, $matches); print "Matches:"; foreach ($matches as $match) { print($match); print("\n"); } $words = array_merge($words, $matches[1]); print "Merged Words:"; 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.70.0130.01016.86
8.3.60.0040.01118.43
8.3.50.0100.01122.10
8.3.40.0110.00419.04
8.3.30.0070.00718.95
8.3.20.0040.00420.33
8.3.10.0080.00021.90
8.3.00.0040.00419.26
8.2.190.0110.00416.58
8.2.180.0110.00716.50
8.2.170.0150.00022.96
8.2.160.0140.00722.38
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00021.05
8.2.110.0130.00320.52
8.2.100.0070.00418.03
8.2.90.0030.00618.00
8.2.80.0060.00319.02
8.2.70.0040.00417.93
8.2.60.0100.00018.34
8.2.50.0090.00019.25
8.2.40.0090.00021.27
8.2.30.0040.00419.37
8.2.20.0000.00917.78
8.2.10.0030.00618.27
8.2.00.0070.00017.90
8.1.280.0100.01025.92
8.1.270.0080.00018.92
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0050.00523.92
8.1.230.0040.00719.60
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.47
8.1.180.0000.00819.03
8.1.170.0030.00518.83
8.1.160.0040.00419.00
8.1.150.0070.00019.05
8.1.140.0020.00517.53
8.1.130.0000.00717.86
8.1.120.0050.00317.52
8.1.110.0040.00417.61
8.1.100.0040.00417.70
8.1.90.0000.00817.59
8.1.80.0110.00017.57
8.1.70.0030.00317.51
8.1.60.0050.00317.79
8.1.50.0090.00017.69
8.1.40.0030.00517.69
8.1.30.0030.00517.72
8.1.20.0040.00417.80
8.1.10.0030.00517.74
8.1.00.0030.00617.55
8.0.300.0000.00918.77
8.0.290.0040.00416.88
8.0.280.0030.00318.38
8.0.270.0040.00417.30
8.0.260.0070.00017.21
8.0.250.0000.00717.11
8.0.240.0030.00317.10
8.0.230.0000.00717.05
8.0.220.0070.00017.11
8.0.210.0000.00716.95
8.0.200.0060.00017.20
8.0.190.0000.00717.01
8.0.180.0000.00817.04
8.0.170.0000.00817.05
8.0.160.0040.00417.20
8.0.150.0000.00716.91
8.0.140.0040.00417.06
8.0.130.0030.00313.57
8.0.120.0030.00517.14
8.0.110.0000.00717.02
8.0.100.0040.00417.01
8.0.90.0040.00417.23
8.0.80.0100.00617.06
8.0.70.0000.00716.93
8.0.60.0070.00016.91
8.0.50.0040.00417.07
8.0.30.0160.00917.41
8.0.20.0090.01417.40
8.0.10.0000.00717.19
8.0.00.0130.00517.20
7.4.330.0050.00015.04
7.4.320.0070.00016.72
7.4.300.0030.00316.73
7.4.290.0000.00716.70
7.4.280.0070.00016.76
7.4.270.0030.00316.86
7.4.260.0030.00316.60
7.4.250.0030.00516.77
7.4.240.0030.00316.73
7.4.230.0020.00516.56
7.4.220.0120.01216.92
7.4.210.0130.00316.90
7.4.200.0030.00316.89
7.4.160.0070.01016.70
7.4.150.0090.01517.40
7.4.140.0110.00617.86
7.4.130.0090.01216.61
7.4.120.0150.00316.78
7.4.110.0140.01116.68
7.4.100.0100.01316.70
7.4.90.0150.00316.88
7.4.80.0060.01519.39
7.4.70.0060.01216.70
7.4.60.0030.01316.82
7.4.50.0030.00316.58
7.4.40.0110.00716.62
7.4.30.0110.01216.52
7.4.00.0060.00915.13
7.3.330.0030.00313.38
7.3.320.0000.00513.52
7.3.310.0040.00416.48
7.3.300.0030.00316.45
7.3.290.0060.00816.49
7.3.280.0090.00616.47
7.3.270.0090.01717.40
7.3.260.0060.01316.54
7.3.250.0110.00916.61
7.3.240.0130.00316.65
7.3.230.0060.01116.45
7.3.210.0140.00316.69
7.3.200.0080.00819.39
7.3.190.0180.00416.66
7.3.180.0060.00916.78
7.3.170.0070.01316.69
7.3.160.0100.00716.60
7.2.330.0090.00916.77
7.2.320.0120.01216.76
7.2.310.0100.00716.75
7.2.300.0050.01316.84
7.2.290.0100.01416.83
7.2.00.0030.01019.57
7.1.100.0000.00918.48
7.1.70.0040.00417.48
7.1.60.0110.01419.22
7.1.50.0130.00917.27
7.1.00.0030.07722.35
7.0.200.0000.00716.89
7.0.140.0030.04721.98
7.0.60.0130.07020.01
7.0.50.0030.04017.82
7.0.40.0070.04720.11
7.0.30.0230.04020.20
7.0.20.0200.06720.11
7.0.10.0030.06320.21
7.0.00.0100.07720.15
5.6.280.0100.06721.11
5.6.210.0100.07720.79
5.6.200.0100.07718.13
5.6.190.0070.08020.27
5.6.180.0330.06720.63
5.6.170.0130.04720.42
5.6.160.0030.04020.47
5.6.150.0070.04318.18
5.6.140.0130.07318.12
5.6.130.0130.08018.21
5.6.120.0030.04020.98
5.6.110.0070.05021.00
5.6.100.0030.04021.00
5.6.90.0030.08320.86
5.6.80.0270.06020.38
5.5.350.0100.04720.30
5.5.340.0070.07017.88
5.5.330.0030.08720.06
5.5.320.0230.04320.18
5.5.310.0230.04720.12
5.5.300.0070.06717.99
5.5.290.0100.07717.93
5.5.280.0130.08020.77
5.5.270.0100.08320.68
5.5.260.0030.08020.80
5.5.250.0070.08020.69
5.5.240.0000.08320.16
5.4.450.0700.05719.14
5.4.440.0430.05719.22
5.4.430.0030.06319.57
5.4.420.0200.04719.48
5.4.410.0200.05719.21
5.4.400.0170.05019.17
5.4.390.0300.04718.64
5.4.380.0200.06018.55
5.4.370.0300.05018.67
5.4.360.0270.05018.57
5.4.350.0370.05718.61
5.4.340.0270.05318.63
5.4.320.0270.06018.61
5.4.310.0300.04718.50
5.4.300.0270.05318.66
5.4.290.0200.05318.47
5.4.280.0270.05018.46
5.4.270.0200.07018.72
5.4.260.0200.06018.56
5.4.250.0270.05718.49
5.4.240.0230.06018.49
5.4.230.0300.05018.68
5.4.220.0230.05318.56
5.4.210.0200.06018.60
5.4.200.0270.05716.51
5.4.190.0230.05318.47
5.4.180.0330.05018.65
5.4.170.0200.06018.59
5.4.160.0430.05718.58
5.4.150.0170.05718.66
5.4.140.0300.04316.29
5.4.130.0300.05016.36
5.4.120.0230.04716.20
5.4.110.0270.04316.39
5.4.100.0230.04716.21
5.4.90.0230.05016.32
5.4.80.0130.05716.27
5.4.70.0230.05716.02
5.4.60.0130.06316.14
5.4.50.0200.05716.03
5.4.40.0230.06016.11
5.4.30.0270.05016.23
5.4.20.0300.07016.29
5.4.10.0230.06316.05
5.4.00.0270.05015.78
5.3.290.0300.05014.74
5.3.280.0270.06314.57
5.3.270.0200.06014.71
5.3.260.0300.05014.59
5.3.250.0270.05714.69
5.3.240.0370.04714.54
5.3.230.0270.05014.76
5.3.220.0330.04314.73
5.3.210.0270.05314.57
5.3.200.0200.05314.61
5.3.190.0200.05714.56
5.3.180.0270.04714.64
5.3.170.0170.06014.57
5.3.160.0300.06714.52
5.3.150.0270.04714.52
5.3.140.0330.06314.54
5.3.130.0300.05314.46
5.3.120.0170.06014.49
5.3.110.0170.06014.53
5.3.100.0270.04713.96
5.3.90.0170.05314.11
5.3.80.0270.05014.13
5.3.70.0270.04714.05
5.3.60.0370.04014.00
5.3.50.0270.04713.92
5.3.40.0230.05313.89
5.3.30.0130.06013.85
5.3.20.0230.05013.86
5.3.10.0270.05313.60
5.3.00.0200.06013.57
5.2.170.0300.03311.37
5.2.160.0170.04311.21
5.2.150.0270.04011.07
5.2.140.0200.04011.10
5.2.130.0100.04711.08
5.2.120.0230.03311.17
5.2.110.0170.04711.14
5.2.100.0130.04711.07
5.2.90.0170.04311.18
5.2.80.0130.05011.13
5.2.70.0200.04311.16
5.2.60.0130.04710.98
5.2.50.0130.04711.05
5.2.40.0170.04310.93
5.2.30.0270.05711.04
5.2.20.0270.04711.19
5.2.10.0100.04710.86
5.2.00.0100.04710.77
5.1.60.0130.0379.98
5.1.50.0130.03710.08
5.1.40.0170.03310.06
5.1.30.0170.03310.30
5.1.20.0070.04710.39
5.1.10.0130.04010.15
5.1.00.0200.03310.21
5.0.50.0100.0278.63
5.0.40.0070.0308.44
5.0.30.0130.0408.24
5.0.20.0100.0278.29
5.0.10.0170.0238.18
5.0.00.0030.0478.21
4.4.90.0100.0275.95
4.4.80.0070.0235.95
4.4.70.0100.0235.89
4.4.60.0100.0235.93
4.4.50.0130.0205.84
4.4.40.0030.0405.91
4.4.30.0100.0235.93
4.4.20.0100.0235.95
4.4.10.0070.0235.91
4.4.00.0170.0335.96
4.3.110.0130.0175.87
4.3.100.0070.0275.84
4.3.90.0130.0175.89
4.3.80.0030.0405.80
4.3.70.0070.0335.84
4.3.60.0070.0235.80
4.3.50.0070.0275.80
4.3.40.0030.0375.89
4.3.30.0000.0274.70
4.3.20.0070.0274.58
4.3.10.0030.0234.64
4.3.00.0100.0237.29

preferences:
34.04 ms | 401 KiB | 5 Q