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.0090.01120.71
8.4.110.0150.00522.59
8.4.100.0100.01117.82
8.4.90.0130.00718.66
8.4.80.0090.00917.93
8.4.70.0140.00617.90
8.4.60.0110.00818.82
8.4.50.0090.01217.73
8.4.40.0170.00318.12
8.4.30.0030.00618.79
8.4.20.0130.00718.42
8.4.10.0030.00519.86
8.3.250.0110.00919.04
8.3.240.0130.00716.47
8.3.230.0120.00816.76
8.3.220.0070.00517.32
8.3.210.0080.00716.99
8.3.200.0050.00416.61
8.3.190.0120.00619.09
8.3.180.0030.00618.32
8.3.170.0030.01418.89
8.3.160.0160.00318.58
8.3.150.0000.00720.68
8.3.140.0060.00316.72
8.3.130.0040.00416.74
8.3.120.0080.00019.03
8.3.110.0060.00320.94
8.3.100.0110.00416.96
8.3.90.0060.00326.77
8.3.80.0070.00416.60
8.3.70.0040.01116.75
8.3.60.0070.01418.56
8.3.50.0180.00223.73
8.3.40.0090.00619.01
8.3.30.0170.00019.17
8.3.20.0090.00021.90
8.3.10.0000.00720.34
8.3.00.0050.00321.73
8.2.290.0120.00720.36
8.2.280.0060.01318.36
8.2.270.0130.00716.96
8.2.260.0180.00018.57
8.2.250.0060.00316.82
8.2.240.0090.00018.95
8.2.230.0070.01022.58
8.2.220.0000.00824.06
8.2.210.0040.00426.77
8.2.200.0030.00616.63
8.2.190.0120.00916.63
8.2.180.0110.00425.92
8.2.170.0090.00622.96
8.2.160.0070.00721.98
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00326.16
8.2.110.0000.00920.52
8.2.100.0090.00317.97
8.2.90.0040.00419.07
8.2.80.0040.00417.97
8.2.70.0000.00917.75
8.2.60.0100.00017.80
8.2.50.0000.00818.07
8.2.40.0080.00020.20
8.2.30.0000.00719.43
8.2.20.0070.00018.13
8.2.10.0000.00719.23
8.2.00.0000.00719.22
8.1.330.0070.01121.95
8.1.320.0110.01016.18
8.1.310.0000.00816.93
8.1.300.0130.00616.58
8.1.290.0060.00330.84
8.1.280.0060.01225.92
8.1.270.0080.00020.53
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0120.00024.04
8.1.230.0060.00621.10
8.1.220.0040.00417.88
8.1.210.0050.00518.79
8.1.200.0080.00017.60
8.1.190.0000.00817.48
8.1.180.0040.00418.10
8.1.170.0030.00718.59
8.1.160.0050.00319.07
8.1.150.0040.00418.77
8.1.140.0000.00718.94
8.1.130.0030.00317.58
8.1.120.0050.00217.56
8.1.110.0040.00417.61
8.1.100.0040.00417.59
8.1.90.0000.00817.49
8.1.80.0040.00417.47
8.1.70.0000.00717.56
8.1.60.0040.00417.57
8.1.50.0040.00417.55
8.1.40.0040.00417.53
8.1.30.0080.00017.71
8.1.20.0030.00517.77
8.1.10.0050.00317.69
8.1.00.0040.00417.63
8.0.300.0070.00020.01
8.0.290.0040.00417.13
8.0.280.0030.00318.55
8.0.270.0040.00418.26
8.0.260.0000.00816.94
8.0.250.0000.00717.22
8.0.240.0070.00217.27
8.0.230.0070.00017.11
8.0.220.0030.00317.09
8.0.210.0030.00316.96
8.0.200.0070.00017.16
8.0.190.0000.00917.14
8.0.180.0060.00317.07
8.0.170.0040.00517.03
8.0.160.0040.00417.09
8.0.150.0000.00717.03
8.0.140.0040.00417.05
8.0.130.0060.00013.50
8.0.120.0040.00417.03
8.0.110.0000.00817.07
8.0.100.0040.00417.14
8.0.90.0060.00617.08
8.0.80.0060.01117.06
8.0.70.0070.00017.01
8.0.60.0000.00817.02
8.0.50.0020.00516.88
8.0.30.0030.01317.44
8.0.20.0130.00817.22
8.0.10.0030.00517.09
8.0.00.0110.00817.02
7.4.330.0000.00415.55
7.4.320.0060.00016.80
7.4.300.0090.00016.68
7.4.290.0040.00416.73
7.4.280.0000.00816.79
7.4.270.0000.00716.64
7.4.260.0000.00513.39
7.4.250.0070.00016.70
7.4.240.0050.00216.72
7.4.230.0000.00816.54
7.4.220.0000.00716.68
7.4.210.0090.00616.82
7.4.200.0040.00416.87
7.4.130.0090.01116.66
7.4.120.0030.01416.84
7.4.110.0070.01016.66
7.4.100.0090.00916.63
7.4.90.0130.00416.68
7.4.80.0090.00919.39
7.4.70.0060.01316.85
7.4.60.0040.01416.58
7.4.50.0110.00616.60
7.4.40.0130.00316.45
7.4.30.0090.00616.46
7.4.20.0110.00516.65
7.4.10.0000.01616.76
7.4.00.0040.01516.68
7.3.330.0030.00416.43
7.3.320.0030.00313.34
7.3.310.0070.00016.32
7.3.300.0000.00716.37
7.3.290.0080.01016.37
7.3.260.0080.01516.81
7.3.240.0080.01016.52
7.3.230.0100.01316.68
7.3.210.0060.01216.54
7.3.200.0110.00516.69
7.3.190.0040.01116.50
7.3.180.0120.00316.64
7.3.170.0040.01216.69
7.3.160.0130.00316.41
7.3.150.0090.00916.75
7.3.140.0030.01216.54
7.3.130.0080.00716.48
7.3.120.0110.00616.69
7.3.110.0070.01016.38
7.3.100.0100.00716.68
7.3.90.0060.01316.68
7.3.80.0060.00916.51
7.3.70.0130.00316.29
7.3.60.0100.00716.55
7.3.50.0060.01216.14
7.3.40.0100.00716.46
7.3.30.0070.01016.56
7.3.20.0080.00816.48
7.3.10.0120.00316.40
7.3.00.0070.01016.38
7.2.330.0110.01116.82
7.2.320.0070.01116.80
7.2.310.0100.00716.58
7.2.300.0030.01416.60
7.2.290.0140.00316.65
7.2.280.0040.01316.59
7.2.270.0100.00716.61
7.2.260.0090.00616.63
7.2.250.0040.01516.69
7.2.240.0130.00516.75
7.2.230.0150.00316.59
7.2.220.0060.01316.80
7.2.210.0000.01716.61
7.2.200.0100.00616.77
7.2.190.0070.01016.59
7.2.180.0110.00716.65
7.2.170.0100.00616.61
7.2.160.0140.00316.71
7.2.150.0100.00716.59
7.2.140.0120.01316.67
7.2.130.0070.01016.56
7.2.120.0090.00916.62
7.2.110.0140.00316.80
7.2.100.0110.00716.42
7.2.90.0070.01016.64
7.2.80.0060.01216.77
7.2.70.0070.01116.81
7.2.60.0110.00716.66
7.2.50.0090.01216.58
7.2.40.0170.01716.73
7.2.30.0040.01516.79
7.2.20.0090.00916.64
7.2.10.0110.00716.71
7.2.00.0110.00716.50

preferences:
118.49 ms | 403 KiB | 5 Q