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); foreach ($words as $word) { print($word); print("\n"); } preg_match_all('/[(<\[]((' . implode('|', $projects) . ')-[0-9]+)[\]>)]/', $value, $matches); $words = array_merge($words, $matches[1]); 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.0040.01118.68
8.3.50.0110.00922.10
8.3.40.0040.01118.95
8.3.30.0080.00619.22
8.3.20.0080.00020.16
8.3.10.0040.00421.95
8.3.00.0050.00319.08
8.2.180.0120.00616.75
8.2.170.0170.00322.96
8.2.160.0100.00322.31
8.2.150.0030.00624.18
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0050.00321.17
8.2.110.0090.00022.39
8.2.100.0090.00317.91
8.2.90.0050.00317.88
8.2.80.0030.00518.86
8.2.70.0000.00818.00
8.2.60.0000.01018.16
8.2.50.0000.00819.46
8.2.40.0000.00821.11
8.2.30.0040.00419.24
8.2.20.0040.00417.79
8.2.10.0040.00418.21
8.2.00.0030.00618.00
8.1.280.0160.00625.92
8.1.270.0030.00618.95
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00718.71
8.1.230.0040.00821.04
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0050.00317.48
8.1.180.0070.00018.93
8.1.170.0000.00818.71
8.1.160.0000.00818.92
8.1.150.0040.00419.09
8.1.140.0030.00517.63
8.1.130.0080.00017.90
8.1.120.0050.00317.61
8.1.110.0040.00417.57
8.1.100.0000.00717.59
8.1.90.0000.00817.55
8.1.80.0030.00717.52
8.1.70.0040.00417.54
8.1.60.0090.00017.78
8.1.50.0030.00717.68
8.1.40.0000.00817.68
8.1.30.0000.00817.86
8.1.20.0000.00817.72
8.1.10.0000.00817.78
8.1.00.0030.00517.57
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00318.47
8.0.270.0040.00417.29
8.0.260.0000.00717.16
8.0.250.0000.00717.14
8.0.240.0030.00317.11
8.0.230.0030.00317.07
8.0.220.0000.00817.06
8.0.210.0070.00017.05
8.0.200.0040.00416.97
8.0.190.0000.00717.17
8.0.180.0040.00416.93
8.0.170.0000.00717.03
8.0.160.0030.00517.04
8.0.150.0000.00717.09
8.0.140.0040.00417.07
8.0.130.0040.00313.45
8.0.120.0040.00417.04
8.0.110.0040.00417.04
8.0.100.0040.00417.04
8.0.90.0000.00817.05
8.0.80.0120.00617.08
8.0.70.0030.00516.94
8.0.60.0050.00316.91
8.0.50.0000.00817.05
8.0.30.0150.00917.38
8.0.20.0090.01317.43
8.0.10.0040.00417.18
8.0.00.0090.00816.98
7.4.330.0000.00515.09
7.4.320.0030.00316.81
7.4.300.0060.00016.80
7.4.290.0000.00716.73
7.4.280.0000.00916.57
7.4.270.0000.00816.84
7.4.260.0000.00716.80
7.4.250.0040.00416.78
7.4.240.0040.00316.74
7.4.230.0030.00316.89
7.4.220.0150.00316.84
7.4.210.0030.01316.70
7.4.200.0020.00516.89
7.4.160.0110.00516.82
7.4.150.0140.01217.40
7.4.140.0100.00917.86
7.4.130.0140.00616.73
7.4.120.0100.00716.86
7.4.110.0180.00316.57
7.4.100.0140.00416.64
7.4.90.0090.00916.65
7.4.80.0140.00319.39
7.4.70.0100.00716.67
7.4.60.0090.00616.70
7.4.50.0000.01016.81
7.4.40.0100.00716.66
7.4.30.0070.01016.70
7.4.00.0030.00715.08
7.3.330.0000.00513.43
7.3.320.0030.00313.32
7.3.310.0040.00416.55
7.3.300.0000.00716.38
7.3.290.0080.00716.41
7.3.280.0090.00616.41
7.3.270.0100.01317.40
7.3.260.0100.01016.68
7.3.250.0080.01016.62
7.3.240.0140.00416.68
7.3.230.0070.01016.48
7.3.210.0140.00316.72
7.3.200.0200.00319.39
7.3.190.0060.01516.71
7.3.180.0090.00616.50
7.3.170.0060.01416.57
7.3.160.0090.00616.66
7.3.10.0050.00716.73
7.3.00.0090.00516.61
7.2.330.0090.01516.75
7.2.320.0100.00616.95
7.2.310.0120.00617.00
7.2.300.0170.00016.73
7.2.290.0060.01816.80
7.2.130.0040.00917.17
7.2.120.0020.01017.04
7.2.110.0090.00417.13
7.2.100.0050.00917.08
7.2.90.0100.00617.25
7.2.80.0050.00917.16
7.2.70.0090.00617.08
7.2.60.0080.00717.01
7.2.50.0150.00217.04
7.2.40.0050.00717.02
7.2.30.0030.01017.00
7.2.20.0090.00717.01
7.2.10.0080.00317.20
7.2.00.0070.00617.90
7.1.250.0110.00515.84
7.1.100.0060.00618.15
7.1.70.0120.00017.39
7.1.60.0300.00617.53
7.1.50.0080.01216.99
7.1.00.0070.07322.30
7.0.200.0060.00917.03
7.0.140.0070.03321.96
7.0.60.0100.05319.91
7.0.50.0070.05017.95
7.0.40.0100.04020.42
7.0.30.0270.05720.02
7.0.20.0470.05020.10
7.0.10.0130.04720.35
7.0.00.0130.06720.21
5.6.280.0030.07321.02
5.6.210.0030.06320.61
5.6.200.0070.05318.23
5.6.190.0030.04720.68
5.6.180.0270.08020.27
5.6.170.0330.07720.33
5.6.160.0070.04020.61
5.6.150.0130.06318.15
5.6.140.0070.05018.12
5.6.130.0200.07718.21
5.6.120.0070.07721.05
5.6.110.0170.04020.99
5.6.100.0130.08021.00
5.6.90.0070.08321.03
5.6.80.0070.05320.41
5.5.350.0170.07320.45
5.5.340.0100.05017.95
5.5.330.0130.07320.43
5.5.320.0270.04720.30
5.5.310.0270.04720.29
5.5.300.0200.06317.98
5.5.290.0130.07018.02
5.5.280.0070.08320.87
5.5.270.0070.05720.79
5.5.260.0030.05320.82
5.5.250.0030.06320.58
5.5.240.0030.03020.26
5.4.450.0570.05019.63
5.4.440.0600.06319.43
5.4.430.0930.05719.49
5.4.420.0170.05319.32
5.4.410.0200.05319.23
5.4.400.0170.04719.09
5.4.390.0200.05718.64
5.4.380.0200.05718.47
5.4.370.0230.05318.68
5.4.360.0300.04718.48
5.4.350.0200.06018.67
5.4.340.0200.05318.67
5.4.320.0170.06018.64
5.4.310.0270.04318.48
5.4.300.0100.06018.66
5.4.290.0200.05018.52
5.4.280.0200.05318.52
5.4.270.0270.05318.57
5.4.260.0230.05318.53
5.4.250.0170.06318.72
5.4.240.0270.05318.48
5.4.230.0170.05718.66
5.4.220.0330.05018.59
5.4.210.0270.04718.73
5.4.200.0200.05016.50
5.4.190.0200.05718.65
5.4.180.0130.05718.65
5.4.170.0300.05318.68
5.4.160.0230.05318.63
5.4.150.0130.06318.52
5.4.140.0100.05316.23
5.4.130.0070.05716.27
5.4.120.0070.05716.32
5.4.110.0330.03716.14
5.4.100.0300.04716.25
5.4.90.0230.05016.14
5.4.80.0230.05016.29
5.4.70.0200.07716.06
5.4.60.0200.05716.29
5.4.50.0270.04316.29
5.4.40.0270.05316.29
5.4.30.0270.05016.04
5.4.20.0270.05316.15
5.4.10.0300.04016.27
5.4.00.0200.05015.54
5.3.290.0330.04314.58
5.3.280.0400.05014.57
5.3.270.0170.06314.70
5.3.260.0230.05714.58
5.3.250.0270.05014.59
5.3.240.0170.06014.54
5.3.230.0200.05714.63
5.3.220.0300.04314.52
5.3.210.0270.05014.50
5.3.200.0200.05314.52
5.3.190.0200.05314.52
5.3.180.0270.04714.56
5.3.170.0170.06014.63
5.3.160.0270.04714.48
5.3.150.0330.04314.49
5.3.140.0230.05314.61
5.3.130.0200.06314.62
5.3.120.0200.06014.50
5.3.110.0430.04314.54
5.3.100.0200.05714.11
5.3.90.0230.05014.07
5.3.80.0270.05014.12
5.3.70.0270.05013.98
5.3.60.0170.06013.93
5.3.50.0230.05313.94
5.3.40.0370.04313.93
5.3.30.0300.04713.90
5.3.20.0230.05313.61
5.3.10.0270.05013.76
5.3.00.0270.05013.61
5.2.170.0330.03311.18
5.2.160.0170.04711.21
5.2.150.0230.05311.36
5.2.140.0200.04011.18
5.2.130.0300.03011.17
5.2.120.0200.04011.14
5.2.110.0300.03011.10
5.2.100.0200.04011.18
5.2.90.0230.03711.17
5.2.80.0200.04011.05
5.2.70.0200.04311.07
5.2.60.0170.04311.12
5.2.50.0170.04310.93
5.2.40.0130.04311.01
5.2.30.0170.04011.12
5.2.20.0100.04711.19
5.2.10.0170.04010.84
5.2.00.0230.03710.82
5.1.60.0170.03310.10
5.1.50.0170.03310.06
5.1.40.0200.03310.09
5.1.30.0200.03710.45
5.1.20.0200.03310.41
5.1.10.0170.03310.13
5.1.00.0200.03010.07
5.0.50.0070.0338.59
5.0.40.0100.0278.44
5.0.30.0070.0478.26
5.0.20.0070.0308.38
5.0.10.0070.0308.36
5.0.00.0130.0508.29
4.4.90.0070.0235.94
4.4.80.0170.0235.88
4.4.70.0100.0205.93
4.4.60.0070.0235.88
4.4.50.0130.0205.95
4.4.40.0100.0375.88
4.4.30.0030.0305.93
4.4.20.0030.0276.01
4.4.10.0070.0335.89
4.4.00.0170.0305.92
4.3.110.0130.0205.83
4.3.100.0100.0205.89
4.3.90.0130.0175.86
4.3.80.0100.0335.83
4.3.70.0130.0235.80
4.3.60.0100.0205.84
4.3.50.0130.0205.79
4.3.40.0070.0375.77
4.3.30.0070.0204.68
4.3.20.0100.0204.65
4.3.10.0070.0204.63
4.3.00.0000.0277.29

preferences:
44.06 ms | 401 KiB | 5 Q