3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = new NumberFormatter('en', NumberFormatter::SPELLOUT); $number = [1,5,10,15, 99, 10000000]; rsort($number); // sort by highest number first // make words from numbers $text = array_map(fn($num) => $word->format($num), $number); // example $str = '1 5 10 15 99 10000000'; echo str_replace($number, $text, $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.5.00.0120.01025.79
8.4.150.0020.00014.05
8.4.140.0120.01120.11
8.4.130.0040.00722.01
8.4.120.0100.00123.11
8.4.110.0170.00624.86
8.4.100.0130.00821.17
8.4.90.0130.00821.55
8.4.80.0120.00921.35
8.4.70.0050.00420.57
8.4.60.0140.00721.11
8.4.50.0140.00822.98
8.4.40.0140.00620.22
8.4.30.0120.00922.86
8.4.20.0170.00321.86
8.4.10.0000.00921.58
8.3.280.0140.00722.25
8.3.270.0150.00719.38
8.3.260.0120.00918.96
8.3.250.0130.00721.22
8.3.240.0110.00921.34
8.3.230.0120.00918.99
8.3.220.0120.00723.35
8.3.210.0070.00418.88
8.3.200.0040.00618.98
8.3.190.0090.00921.53
8.3.180.0130.00718.89
8.3.170.0080.00021.32
8.3.160.0060.01320.78
8.3.150.0030.01618.91
8.3.140.0080.01119.76
8.3.130.0000.00821.00
8.3.120.0150.00323.12
8.3.110.0140.00620.94
8.3.100.0180.00024.06
8.3.90.0150.00326.77
8.3.80.0030.00719.00
8.3.70.0070.01319.00
8.3.60.0030.01218.88
8.3.50.0120.00920.89
8.3.40.0030.01322.29
8.3.30.0040.01120.38
8.3.20.0050.00324.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0120.00823.03
8.2.280.0120.00821.08
8.2.270.0100.01019.61
8.2.260.0210.01418.98
8.2.250.0060.00321.16
8.2.240.0170.00321.55
8.2.230.0030.00622.58
8.2.220.0100.00037.54
8.2.210.0280.00726.77
8.2.200.0070.00319.00
8.2.190.0130.01019.00
8.2.180.0110.01125.92
8.2.170.0160.00620.69
8.2.160.0030.01822.96
8.2.150.0030.00525.66
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0110.00022.39
8.2.100.0120.01219.91
8.2.90.0030.00620.00
8.2.80.0030.00620.54
8.2.70.0000.00919.75
8.2.60.0040.00419.88
8.2.50.0030.00619.75
8.2.40.0030.00622.03
8.2.30.0000.00819.96
8.2.20.0030.00520.55
8.2.10.0050.00320.57
8.2.00.0030.00621.13
8.1.330.0050.00724.50
8.1.320.0120.00918.64
8.1.310.0030.00520.84
8.1.300.0150.00419.82
8.1.290.0000.01018.88
8.1.280.0120.00625.92
8.1.270.0040.00425.46
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0030.00625.69
8.1.230.0060.00621.45
8.1.220.0030.00619.73
8.1.210.0090.00419.61
8.1.200.0060.00319.61
8.1.190.0000.00819.47
8.1.180.0060.00319.63
8.1.170.0080.00020.91
8.1.160.0030.00620.71
8.1.150.0040.00420.43
8.1.140.0040.00419.64
8.1.130.0070.00020.69
8.1.120.0050.00319.99
8.1.110.0050.00319.53
8.1.100.0040.00419.97
8.1.90.0000.00820.02
8.1.80.0000.00819.87
8.1.70.0040.00419.63
8.1.60.0000.00820.10
8.1.50.0040.00419.70
8.1.40.0050.00519.96
8.1.30.0060.00319.99
8.1.20.0090.00020.19
8.1.10.0060.00320.00
8.1.00.0040.00419.80
8.0.300.0040.00419.16
8.0.290.0060.00318.88
8.0.280.0000.00720.34
8.0.270.0000.00819.00
8.0.260.0040.00420.24
8.0.250.0070.00019.38
8.0.240.0070.00019.11
8.0.230.0040.00419.16
8.0.220.0000.00718.95
8.0.210.0080.00019.07
8.0.200.0000.00819.32
8.0.190.0000.00919.09
8.0.180.0040.00419.22
8.0.170.0040.00419.36
8.0.160.0060.00318.92
8.0.150.0050.00319.04
8.0.140.0040.00419.18
8.0.130.0040.00413.29
8.0.120.0060.00319.40
8.0.110.0080.00019.48
8.0.100.0000.00919.47
8.0.90.0040.00419.48
8.0.80.0030.00519.40
8.0.70.0040.00419.35
8.0.60.0030.00519.41
8.0.50.0080.00019.49
8.0.30.0000.00919.39
8.0.20.0080.00019.35
8.0.10.0040.00419.55
8.0.00.0090.00019.43
7.4.330.0000.00515.55
7.4.320.0000.00719.18
7.4.300.0040.00419.04
7.4.290.0040.00419.12
7.4.280.0030.00619.01
7.4.270.0000.00819.14
7.4.260.0040.00413.16
7.4.250.0040.00419.09
7.4.240.0040.00419.14
7.4.230.0040.00419.17
7.4.220.0000.00718.95
7.4.210.0030.00619.10
7.4.200.0030.00618.91
7.4.190.0040.00419.02
7.4.180.0030.00519.19
7.4.160.0040.00418.90
7.4.150.0000.00718.93
7.4.140.0000.00718.87
7.4.130.0000.00718.76
7.4.120.0000.00718.88
7.4.110.0000.00818.94
7.4.100.0080.00018.89
7.4.90.0000.00818.96
7.4.80.0070.00018.95
7.4.70.0040.00418.87
7.4.60.0070.00018.77
7.4.50.0000.00718.84
7.4.40.0030.00518.69
7.4.30.0040.00418.83
7.4.20.0070.00018.96
7.4.10.0000.00818.86
7.4.00.0040.00418.79
7.3.330.0030.00616.13
7.3.320.0000.00513.14
7.3.310.0030.00316.19
7.3.300.0000.00716.25
7.3.290.0070.00016.02
7.3.280.0060.00316.30
7.3.270.0000.00716.25
7.3.260.0030.00616.10
7.3.250.0030.00316.02
7.3.240.0040.00416.25
7.3.230.0000.00716.21
7.3.220.0040.00416.19
7.3.210.0030.00316.11
7.3.200.0060.00016.17
7.3.190.0050.00216.24
7.3.180.0070.00016.24
7.3.170.0030.00315.96
7.3.160.0040.00415.95
7.3.150.0000.00716.03
7.3.140.0040.00416.07
7.3.130.0060.00015.94
7.3.120.0030.00316.18
7.3.110.0000.00816.13
7.3.100.0080.00015.91
7.3.90.0000.00716.23
7.3.80.0000.00715.98
7.3.70.0060.00016.23
7.3.60.0000.00716.08
7.3.50.0000.00716.07
7.3.40.0030.00316.18
7.3.30.0070.00016.20
7.3.20.0030.00318.11
7.3.10.0080.00018.13
7.3.00.0070.00018.05

preferences:
36.15 ms | 403 KiB | 5 Q