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)
5.4.390.0170.05318.80
5.4.380.0300.04718.70
5.4.370.0330.04018.84
5.4.360.0300.04318.49
5.4.350.0300.05018.78
5.4.340.0200.05318.80
5.4.320.0170.05718.48
5.4.310.0170.05718.57
5.4.300.0370.04018.80
5.4.290.0100.06718.85
5.4.280.0100.06318.76
5.4.270.0100.06018.84
5.4.260.0130.06018.51
5.4.250.0170.05318.80
5.4.240.0100.06018.73
5.4.230.0300.04018.60
5.4.220.0200.05318.61
5.4.210.0070.06318.56
5.4.200.0170.05016.66
5.4.190.0130.05718.79
5.4.180.0200.05018.77
5.4.170.0230.05018.61
5.4.160.0230.04718.46
5.4.150.0100.07018.55
5.4.140.0130.07016.20
5.4.130.0200.04716.34
5.4.120.0200.05016.30
5.4.110.0230.05016.43
5.4.100.0170.06016.18
5.4.90.0200.05716.29
5.4.80.0170.05716.18
5.4.70.0200.04716.19
5.4.60.0270.04316.25
5.4.50.0200.04716.21
5.4.40.0130.05716.40
5.4.30.0270.04016.16
5.4.20.0170.05316.38
5.4.10.0200.05016.25
5.4.00.0200.06315.69
5.3.290.0230.05314.57
5.3.280.0300.04314.50
5.3.270.0200.05314.57
5.3.260.0200.05014.54
5.3.250.0230.04714.72
5.3.240.0100.06014.61
5.3.230.0170.05314.58
5.3.220.0130.06314.50
5.3.210.0170.05314.59
5.3.200.0170.05314.68
5.3.190.0170.05714.67
5.3.180.0230.04714.55
5.3.170.0070.06314.56
5.3.160.0130.05714.58
5.3.150.0130.05714.59
5.3.140.0230.04314.53
5.3.130.0330.04014.54
5.3.120.0170.05314.45
5.3.110.0230.04714.57
5.3.100.0200.05014.02
5.3.90.0200.07014.04
5.3.80.0200.05013.97
5.3.70.0270.04014.02
5.3.60.0300.03713.91
5.3.50.0200.05013.95
5.3.40.0400.04713.94
5.3.30.0230.04713.82
5.3.20.0230.05013.80
5.3.10.0070.06013.76
5.3.00.0130.06713.64
5.2.170.0130.04311.11
5.2.160.0170.04011.19
5.2.150.0130.04011.16
5.2.140.0130.04311.10
5.2.130.0130.04311.10
5.2.120.0130.04311.12
5.2.110.0200.03711.10
5.2.100.0100.05711.18
5.2.90.0300.02711.17
5.2.80.0200.05011.16
5.2.70.0170.04011.09
5.2.60.0170.04011.20
5.2.50.0200.03711.18
5.2.40.0200.03311.00
5.2.30.0070.04711.03
5.2.20.0100.04711.02
5.2.10.0130.04010.89
5.2.00.0100.04310.70
5.1.60.0200.02710.04
5.1.50.0130.0339.97
5.1.40.0070.0409.96
5.1.30.0130.04710.35
5.1.20.0200.03710.41
5.1.10.0100.03710.07
5.1.00.0070.04010.10
5.0.50.0100.0278.63
5.0.40.0070.0278.48
5.0.30.0100.0408.38
5.0.20.0070.0278.28
5.0.10.0170.0208.28
5.0.00.0070.0438.21
4.4.90.0130.0175.89
4.4.80.0030.0275.91
4.4.70.0070.0275.91
4.4.60.0130.0305.89
4.4.50.0130.0135.83
4.4.40.0100.0305.88
4.4.30.0070.0205.91
4.4.20.0070.0205.89
4.4.10.0000.0275.96
4.4.00.0070.0375.93
4.3.110.0030.0305.90
4.3.100.0030.0335.85
4.3.90.0070.0205.82
4.3.80.0030.0435.81
4.3.70.0100.0275.85
4.3.60.0000.0305.86
4.3.50.0000.0305.79
4.3.40.0100.0405.80
4.3.30.0030.0304.60
4.3.20.0030.0234.54
4.3.10.0030.0234.51
4.3.00.0030.0277.30

preferences:
143.18 ms | 1394 KiB | 7 Q