3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chords = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']; // Therefore, If the original chord is E and we want to transpose +1, the resulting chord is F. If we transpose +4, the resulting chord is G#. $index = array_search('E', $chords); // Transpose +4 to get the index of E, found above, +4 chords $chord = $chords[$index+4]; echo 'Chord: ' + $chord;

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.0110.01118.52
8.3.50.0140.00717.87
8.3.40.0110.00418.96
8.3.30.0080.00818.81
8.3.20.0080.00020.16
8.3.10.0070.00321.77
8.3.00.0070.01120.81
8.2.180.0110.00418.32
8.2.170.0100.00622.96
8.2.160.0090.00619.04
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0090.00920.35
8.2.120.0090.00926.35
8.2.110.0060.00321.04
8.2.100.0090.00318.03
8.2.90.0090.00017.75
8.2.80.0080.00017.97
8.2.70.0050.00318.04
8.2.60.0040.00418.09
8.2.50.0000.00818.10
8.2.40.0050.00519.38
8.2.30.0040.00419.24
8.2.20.0060.00317.82
8.2.10.0040.00418.16
8.2.00.0070.00018.11
8.1.280.0090.00625.92
8.1.270.0090.00923.69
8.1.260.0000.00828.09
8.1.250.0150.00428.09
8.1.240.0040.00817.36
8.1.230.0090.00317.91
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0000.00818.46
8.1.160.0070.00018.89
8.1.150.0060.00318.73
8.1.140.0070.00019.50
8.1.130.0040.00417.62
8.1.120.0030.00317.44
8.1.110.0040.00417.27
8.1.100.0030.00517.39
8.1.90.0030.00617.36
8.1.80.0000.00717.35
8.1.70.0000.00817.37
8.1.60.0040.00417.50
8.1.50.0040.00417.47
8.1.40.0070.00417.41
8.1.30.0060.00317.52
8.1.20.0060.00317.59
8.1.10.0050.00717.53
8.1.00.0000.00817.40
8.0.300.0000.00818.77
8.0.290.0030.00516.63
8.0.280.0000.00718.37
8.0.270.0000.00717.12
8.0.260.0030.00317.05
8.0.250.0000.00716.87
8.0.240.0060.00316.91
8.0.230.0070.00016.86
8.0.220.0040.00416.86
8.0.210.0030.00316.92
8.0.200.0030.00516.86
8.0.190.0040.00416.91
8.0.180.0050.00216.92
8.0.170.0000.00816.87
8.0.160.0080.00016.91
8.0.150.0070.00016.88
8.0.140.0000.00916.80
8.0.130.0000.00613.25
8.0.120.0030.00616.73
8.0.110.0000.00816.95
8.0.100.0040.00416.95
8.0.90.0080.00016.76
8.0.80.0000.01616.84
8.0.70.0000.00816.77
8.0.60.0080.00016.74
8.0.50.0040.00416.75
8.0.30.0070.00916.93
8.0.20.0090.01017.40
8.0.10.0040.00416.94
8.0.00.0090.00816.63
7.4.330.0020.00215.08
7.4.320.0030.00316.42
7.4.300.0030.00316.45
7.4.290.0000.00716.48
7.4.280.0050.00316.34
7.4.270.0070.00016.52
7.4.260.0040.00416.53
7.4.250.0000.00816.45
7.4.240.0000.00716.45
7.4.230.0030.00316.55
7.4.220.0090.00916.55
7.4.210.0090.00816.48
7.4.200.0000.00816.57
7.4.160.0040.01116.26
7.4.150.0160.00317.40
7.4.140.0030.01417.86
7.4.130.0130.01016.47
7.4.120.0060.01316.37
7.4.110.0100.01016.63
7.4.100.0100.00616.56
7.4.90.0130.00316.59
7.4.80.0090.00919.39
7.4.70.0030.01416.44
7.4.60.0130.00316.52
7.4.50.0050.00716.40
7.4.40.0130.00316.50
7.4.30.0100.00616.69
7.4.00.0110.00214.98
7.3.330.0000.00513.15
7.3.320.0030.00313.16
7.3.310.0040.00416.17
7.3.300.0030.00316.18
7.3.290.0080.00016.28
7.3.280.0090.00616.33
7.3.270.0100.00617.40
7.3.260.0130.00716.37
7.3.250.0080.01316.38
7.3.240.0080.00816.51
7.3.230.0070.01016.62
7.3.210.0120.00416.38
7.3.200.0120.00616.42
7.3.190.0030.01416.33
7.3.180.0130.01016.30
7.3.170.0100.00616.43
7.3.160.0060.01016.46
7.3.120.0120.00415.00
7.3.110.0060.01314.69
7.3.100.0060.01214.70
7.3.90.0070.00714.90
7.3.80.0000.01014.87
7.3.70.0000.01014.87
7.3.60.0070.00714.72
7.3.50.0060.00314.88
7.3.40.0070.00714.90
7.3.30.0080.00014.91
7.3.20.0030.01316.52
7.3.10.0110.00416.74
7.3.00.0000.01216.79
7.2.330.0110.00816.55
7.2.320.0100.01016.61
7.2.310.0130.00716.74
7.2.300.0030.01316.33
7.2.290.0150.00316.43
7.2.250.0070.01014.71
7.2.240.0070.01115.18
7.2.230.0110.00414.93
7.2.220.0030.01214.71
7.2.210.0040.00715.14
7.2.200.0030.01215.05
7.2.190.0080.00815.01
7.2.180.0000.01414.97
7.2.170.0060.00915.01
7.2.160.0030.00614.79
7.2.150.0100.00016.85
7.2.140.0090.00916.88
7.2.130.0030.01017.06
7.2.120.0030.00616.77
7.2.110.0060.01116.67
7.2.100.0070.01116.96
7.2.90.0060.00916.84
7.2.80.0040.00716.95
7.2.70.0030.01017.01
7.2.60.0160.00316.85
7.2.50.0030.01016.73
7.2.40.0070.00416.98
7.2.30.0080.00816.86
7.2.20.0080.00616.71
7.2.10.0100.00316.85
7.2.00.0030.00918.13
7.1.330.0060.01016.02
7.1.320.0070.01015.65
7.1.310.0000.01115.55
7.1.300.0040.00715.78
7.1.290.0000.00915.82
7.1.280.0090.00015.77
7.1.270.0100.00315.60
7.1.260.0090.00915.86
7.1.250.0100.00315.89
7.1.240.0040.00715.98
7.1.230.0050.00315.81
7.1.220.0000.01515.58
7.1.210.0040.00815.90
7.1.200.0030.01015.84
7.1.190.0070.00715.64
7.1.180.0060.00315.70
7.1.170.0080.00515.59
7.1.160.0030.01015.88
7.1.150.0120.00315.57
7.1.140.0130.00015.78
7.1.130.0000.01215.79
7.1.120.0040.01115.75
7.1.110.0090.00315.83
7.1.100.0020.00716.90
7.1.90.0030.00915.85
7.1.80.0030.00615.82
7.1.70.0030.00816.41
7.1.60.0130.00617.93
7.1.50.0140.00825.42
7.1.40.0090.00615.83
7.1.30.0000.01315.87
7.1.20.0080.00815.66
7.1.10.0030.00615.71
7.1.00.0030.04418.97
7.0.330.0090.00615.15
7.0.320.0070.00415.35
7.0.310.0030.00915.44
7.0.300.0040.00715.32
7.0.290.0030.00715.32
7.0.280.0040.00415.20
7.0.270.0060.00915.39
7.0.260.0000.01115.21
7.0.250.0060.01015.25
7.0.240.0070.00315.26
7.0.230.0070.00715.43
7.0.220.0030.00515.50
7.0.210.0090.00015.16
7.0.200.0060.00815.13
7.0.190.0110.00415.50
7.0.180.0080.00415.47
7.0.170.0000.01015.48
7.0.160.0070.00715.46
7.0.150.0040.00715.31
7.0.140.0000.01415.16
7.0.130.0060.00615.63
7.0.120.0060.00315.65
7.0.110.0060.00615.48
7.0.100.0060.00615.17
7.0.90.0130.00315.33
7.0.80.0070.00715.18
7.0.70.0560.03017.73
7.0.60.0300.03017.73
7.0.50.0470.04417.95
7.0.40.0430.03516.88
7.0.30.0550.03216.79
7.0.20.0620.03616.97
7.0.10.0530.03616.94
7.0.00.0610.03616.88
5.6.400.0090.00014.25
5.6.390.0070.00414.24
5.6.380.0040.00714.50
5.6.370.0100.00314.43
5.6.360.0040.01114.07
5.6.350.0060.00614.38
5.6.340.0030.01014.07
5.6.330.0040.01114.09
5.6.320.0000.01014.45
5.6.310.0000.01014.35
5.6.300.0030.00714.55
5.6.290.0060.00614.32
5.6.280.0080.03917.75
5.6.270.0110.00014.40
5.6.260.0070.00314.47
5.6.250.0100.00314.06
5.6.240.0090.00314.49
5.6.230.0080.00614.46
5.6.220.0420.03317.42
5.6.210.0480.03417.37
5.6.200.0470.03817.82
5.6.190.0490.03517.92
5.6.180.0680.03517.82
5.6.170.0490.03417.68
5.6.160.0330.04317.72
5.6.150.0520.03217.63
5.6.140.0530.03317.81
5.6.130.0530.04317.85
5.6.120.0560.03317.71
5.6.110.0250.03717.69
5.6.100.0620.03817.75
5.6.90.0530.04017.63
5.6.80.0480.03517.24
5.6.70.0520.04017.40
5.6.60.0530.03517.49
5.6.50.0500.02817.50
5.6.40.0570.03817.33
5.6.30.0600.03117.40
5.6.20.0550.03017.44
5.6.10.0470.04017.43
5.6.00.0340.03317.46
5.5.380.0040.01114.42
5.5.370.0110.00414.10
5.5.360.0490.03617.42
5.5.350.0070.03217.50
5.5.340.0600.02517.48
5.5.330.0600.03517.62
5.5.320.0430.03917.64
5.5.310.0370.03217.58
5.5.300.0740.03517.68
5.5.290.0500.03517.68
5.5.280.0400.02817.63
5.5.270.0050.04117.54
5.5.260.0520.04517.65
5.5.250.0480.03417.44
5.5.240.0570.03517.25
5.5.230.0580.02817.27
5.5.220.0520.03217.29
5.5.210.0520.03217.19
5.5.200.0560.03217.35
5.5.190.0400.03717.24
5.5.180.0550.03517.38
5.5.170.0070.00714.40
5.5.160.0480.03417.03
5.5.150.0500.03017.31
5.5.140.0450.03417.34
5.5.130.0540.02917.39
5.5.120.0540.02517.30
5.5.110.0500.03717.29
5.5.100.0520.03017.20
5.5.90.0540.03417.29
5.5.80.0400.03917.22
5.5.70.0510.03017.19
5.5.60.0470.03217.31
5.5.50.0630.04017.26
5.5.40.0510.03517.28
5.5.30.0580.02817.14
5.5.20.0570.03917.19
5.5.10.0440.03417.07
5.5.00.0480.03417.21

preferences:
74.35 ms | 401 KiB | 5 Q