3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<'EOD' 1er couplet: Gm G Mon enfant, nue sur les galets G D7 Le vent dans tes cheveux defaits Dsus Cmaj Comme un printemps sur mon trajet C Em Un diamant tombé d'un coffret EOD; $pattern = <<<'EOD' ~ \b (?: G,C,D | A,B,C | E,C,D | [A-G] (?: \# | b )? (?: / [A-G] b)? (?: (?: maj | min | sus | add | aug | dim ) \d{0,2} (?: \# \d{1,2} | sus \d )? | m \d{0,2} (?: (?: maj | add | \# )? \d{0,2} )? | -? \d{0,2} (?: \( [^)]* \) | \# \d{1,2} )? ) ) (?!\S) ~x EOD; echo preg_replace($pattern, '[$0]', $str);

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.4.120.0100.00920.52
8.4.110.0150.00618.95
8.4.100.0080.01218.72
8.4.90.0120.00920.52
8.4.80.0070.01318.80
8.4.70.0080.01318.87
8.4.60.0130.00818.64
8.4.50.0100.01018.60
8.4.40.0110.00019.33
8.4.30.0170.00320.37
8.4.20.0140.00718.13
8.4.10.0000.00918.78
8.3.250.0100.00819.14
8.3.240.0100.01016.73
8.3.230.0130.00516.46
8.3.220.0080.00319.11
8.3.210.0100.00517.04
8.3.200.0040.00516.69
8.3.190.0130.00718.81
8.3.180.0140.00519.03
8.3.170.0100.01017.04
8.3.160.0150.00317.08
8.3.150.0110.00317.26
8.3.140.0110.00018.93
8.3.130.0000.00918.49
8.3.120.0000.00820.68
8.3.110.0060.00320.94
8.3.100.0080.00316.88
8.3.90.0120.00316.90
8.3.80.0050.00518.43
8.3.70.0140.00316.75
8.3.60.0070.00718.43
8.3.50.0120.00624.64
8.3.40.0140.00719.10
8.3.30.0090.00619.05
8.3.20.0070.00021.77
8.3.10.0080.00022.10
8.3.00.0040.00421.89
8.2.290.0110.00816.61
8.2.280.0110.00818.57
8.2.270.0110.00717.28
8.2.260.0100.00716.60
8.2.250.0000.00816.95
8.2.240.0030.00617.00
8.2.230.0030.00622.58
8.2.220.0030.00624.06
8.2.210.0080.00326.77
8.2.200.0090.00016.75
8.2.190.0140.00316.63
8.2.180.0070.01116.75
8.2.170.0100.00622.96
8.2.160.0110.00322.44
8.2.150.0070.00024.18
8.2.140.0030.00624.66
8.2.130.0000.00826.16
8.2.120.0050.00326.16
8.2.110.0090.00022.37
8.2.100.0060.00618.03
8.2.90.0040.00419.08
8.2.80.0060.00317.97
8.2.70.0060.00317.63
8.2.60.0060.00317.80
8.2.50.0050.00318.07
8.2.40.0060.00318.00
8.2.30.0040.00418.02
8.2.20.0060.00318.04
8.2.10.0050.00319.23
8.2.00.0040.00419.25
8.1.330.0140.00516.22
8.1.320.0040.00516.18
8.1.310.0060.00316.41
8.1.300.0160.00316.26
8.1.290.0100.00318.88
8.1.280.0060.00925.92
8.1.270.0050.00322.18
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00621.43
8.1.230.0140.00017.47
8.1.220.0000.00817.77
8.1.210.0080.00018.77
8.1.200.0040.00417.48
8.1.190.0080.00017.47
8.1.180.0030.00618.10
8.1.170.0080.00018.90
8.1.160.0000.00918.79
8.1.150.0040.00418.93
8.1.140.0000.00718.83
8.1.130.0030.00320.05
8.1.120.0080.00317.59
8.1.110.0000.00717.49
8.1.100.0040.00417.63
8.1.90.0030.00617.46
8.1.80.0000.00717.64
8.1.70.0040.00417.54
8.1.60.0050.00517.66
8.1.50.0040.00417.53
8.1.40.0040.00417.65
8.1.30.0050.00317.73
8.1.20.0000.00817.69
8.1.10.0000.00817.68
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.46
8.0.270.0030.00318.16
8.0.260.0000.00618.41
8.0.250.0070.00017.19
8.0.240.0060.00317.20
8.0.230.0000.00717.11
8.0.220.0020.00517.01
8.0.210.0030.00317.02
8.0.200.0040.00417.02
8.0.190.0040.00417.10
8.0.180.0050.00317.07
8.0.170.0060.00317.08
8.0.160.0040.00417.13
8.0.150.0000.00816.92
8.0.140.0050.00317.04
8.0.130.0000.00513.46
8.0.120.0040.00417.05
8.0.110.0000.00916.95
8.0.100.0080.00016.96
8.0.90.0000.00916.90
8.0.80.0100.00817.05
8.0.70.0000.00716.88
8.0.60.0000.00716.99
8.0.50.0000.00717.19
8.0.30.0070.01317.23
8.0.20.0050.01317.25
8.0.10.0040.00417.09
8.0.00.0120.01117.02
7.4.330.0050.00015.55
7.4.320.0030.00316.66
7.4.300.0000.00616.69
7.4.290.0000.00716.59
7.4.280.0000.00816.66
7.4.270.0030.00316.70
7.4.260.0050.00013.45
7.4.250.0060.00316.57
7.4.240.0050.00216.75
7.4.230.0040.00416.77
7.4.220.0070.00016.57
7.4.210.0090.01016.67
7.4.200.0040.00416.67
7.4.130.0110.00716.72
7.4.120.0090.00916.52
7.4.110.0070.01416.77
7.4.100.0070.01016.70
7.4.90.0090.00916.72
7.4.80.0150.00619.39
7.4.70.0030.01316.59
7.4.60.0090.00916.79
7.4.50.0040.00816.50
7.4.40.0130.00716.58
7.4.30.0120.00916.63
7.4.20.0110.00616.64
7.4.10.0100.00916.58
7.4.00.0090.01116.77
7.3.330.0040.00416.35
7.3.320.0030.00313.10
7.3.310.0000.00816.33
7.3.300.0070.00016.24
7.3.290.0080.00916.40
7.3.260.0200.01716.47
7.3.240.0130.00716.49
7.3.230.0030.01516.29
7.3.210.0040.01216.51
7.3.200.0060.01016.29
7.3.190.0130.00716.48
7.3.180.0070.01316.67
7.3.170.0030.01716.45
7.3.160.0090.00916.51
7.3.150.0120.00916.66
7.3.140.0080.01216.51
7.3.130.0120.00816.39
7.3.120.0060.01416.49
7.3.110.0130.00616.47
7.3.100.0110.00816.44
7.3.90.0130.01016.40
7.3.80.0130.00916.49
7.3.70.0060.01316.43
7.3.60.0140.00616.32
7.3.50.0060.01216.58
7.3.40.0160.00516.46
7.3.30.0130.00816.52
7.3.20.0130.01017.46
7.3.10.0510.00417.46
7.3.00.0120.00917.34
7.2.330.0070.01116.47
7.2.320.0160.00616.77
7.2.310.0000.01616.59
7.2.300.0160.00316.84
7.2.290.0140.00516.71
7.2.280.0030.01516.61
7.2.270.0070.01216.59
7.2.260.0060.01416.74
7.2.250.0070.01216.71
7.2.240.0090.01016.63
7.2.230.0090.01216.59
7.2.220.0170.00616.59
7.2.210.0120.00916.60
7.2.200.0110.01216.61
7.2.190.0110.00916.64
7.2.180.0110.00616.71
7.2.170.0160.00716.68
7.2.160.0080.01216.65
7.2.150.0120.00917.68
7.2.140.0200.00917.63
7.2.130.0070.01617.54
7.2.120.0070.01317.59
7.2.110.0150.00517.64
7.2.100.0110.00817.68
7.2.90.0050.01517.55
7.2.80.0100.01417.60
7.2.70.0120.00717.57
7.2.60.0120.01117.48
7.2.50.0110.00917.47
7.2.40.0080.01317.65
7.2.30.0130.00917.57
7.2.20.0080.01117.51
7.2.10.0080.01317.61
7.2.00.0150.00217.47

preferences:
32.72 ms | 403 KiB | 5 Q