3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $a = array("1"=>2,"2"=>8,"3"=>9,"4"=>8,"5"=>6,"6"=>7,"7"=>9,"8"=>2); // used short array notation (see references) and removed keys (since not used) $numbers = [2,8,9,8,6,7,9,2,95890814984141]; // the last number is for my pleasure :P $numberFormatter = new NumberFormatter('en', NumberFormatter::SPELLOUT); foreach ($numbers as $number) { $numberSpelled = $numberFormatter->format($number); $numberSpelledWithFirstCharUpper = ucfirst($numberSpelled); echo $numberSpelledWithFirstCharUpper . ' - ' . $number . PHP_EOL; }

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.130.0050.00320.80
8.3.120.0100.01022.98
8.3.110.0060.00320.96
8.3.100.0140.00324.06
8.3.90.0180.00326.77
8.3.80.0030.00720.77
8.3.70.0110.00819.00
8.3.60.0220.00019.13
8.3.50.0120.00625.78
8.3.40.0160.00420.24
8.3.30.0060.00920.42
8.3.20.0030.00624.18
8.3.10.0050.00324.66
8.3.00.0030.00726.16
8.2.250.0110.00019.38
8.2.240.0140.00719.93
8.2.230.0000.00820.94
8.2.220.0000.01137.54
8.2.210.0080.00826.77
8.2.200.0090.00319.00
8.2.190.0060.01219.13
8.2.180.0080.00825.92
8.2.170.0160.00320.58
8.2.160.0030.01622.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0090.00026.16
8.2.120.0080.00026.35
8.2.110.0060.00323.85
8.2.100.0090.00319.94
8.2.90.0030.00619.88
8.2.80.0060.00320.48
8.2.70.0030.00919.88
8.2.60.0030.00820.05
8.2.50.0040.00819.88
8.2.40.0050.00320.47
8.2.30.0000.00820.34
8.2.20.0030.00520.34
8.2.10.0000.00821.16
8.2.00.0060.00320.96
8.1.300.0160.00322.05
8.1.290.0040.00830.84
8.1.280.0120.00625.92
8.1.270.0030.00724.17
8.1.260.0060.00328.09
8.1.250.0090.00028.09
8.1.240.0070.00325.54
8.1.230.0060.00619.83
8.1.220.0000.00920.04
8.1.210.0090.00019.48
8.1.200.0060.00319.61
8.1.190.0060.00319.48
8.1.180.0060.00319.78
8.1.170.0040.00420.91
8.1.160.0030.00520.72
8.1.150.0000.00820.57
8.1.140.0000.00822.53
8.1.130.0040.00421.97
8.1.120.0030.00620.01
8.1.110.0030.00619.93
8.1.100.0040.00419.59
8.1.90.0050.00319.45
8.1.80.0030.00519.91
8.1.70.0000.00719.90
8.1.60.0080.00019.69
8.1.50.0030.00620.03
8.1.40.0040.00720.06
8.1.30.0000.00820.06
8.1.20.0000.00920.22
8.1.10.0060.00320.08
8.1.00.0040.00420.04
8.0.300.0090.00018.97
8.0.290.0060.00319.00
8.0.280.0000.01020.24
8.0.270.0000.00819.70
8.0.260.0030.00321.93
8.0.250.0000.00719.09
8.0.240.0040.00419.17
8.0.230.0000.00919.36
8.0.220.0040.00419.23
8.0.210.0000.00719.05
8.0.200.0030.00619.18
8.0.190.0080.00019.15
8.0.180.0000.00819.30
8.0.170.0030.00619.21
8.0.160.0090.00019.16
8.0.150.0080.00018.94
8.0.140.0030.00519.07
8.0.130.0050.00013.30
8.0.120.0040.00419.35
8.0.110.0080.00019.17
8.0.100.0030.00619.34
8.0.90.0040.00419.30
8.0.80.0100.00619.18
8.0.70.0040.00419.16
8.0.60.0040.00419.34
8.0.50.0040.00419.43
8.0.30.0120.00619.33
8.0.20.0120.00819.65
8.0.10.0040.00419.09
8.0.00.0030.01718.99
7.4.330.0030.00315.55
7.4.320.0070.00018.88
7.4.300.0030.00319.02
7.4.290.0040.00419.00
7.4.280.0000.00819.15
7.4.270.0070.00018.97
7.4.260.0000.00613.35
7.4.250.0040.00418.94
7.4.240.0070.00019.16
7.4.230.0030.00519.13
7.4.220.0040.00319.21
7.4.210.0100.00818.94
7.4.200.0000.00819.09
7.4.130.0090.01118.89
7.4.120.0120.01218.82
7.4.110.0090.00918.90
7.4.100.0070.01118.70
7.4.90.0140.00718.60
7.4.80.0080.01618.32
7.4.70.0130.01318.93
7.4.60.0070.01418.86
7.4.50.0140.00718.87
7.4.40.0110.01418.66
7.4.30.0130.00818.72
7.4.20.0090.00918.51
7.4.10.0210.00318.50
7.4.00.0130.01018.59
7.3.330.0050.00318.49
7.3.320.0000.00613.15
7.3.310.0050.00518.71
7.3.300.0000.00818.69
7.3.290.0060.00918.83
7.3.280.0040.01118.81
7.3.260.0100.01618.47
7.3.230.0100.01018.56
7.3.210.0170.00418.69
7.3.200.0130.00618.53
7.3.190.0090.01118.79
7.3.180.0060.01718.91
7.3.170.0100.01418.75
7.3.160.0160.00318.30
7.3.150.0070.01319.13
7.3.140.0090.00918.80
7.3.130.0030.01518.62
7.3.120.0120.00618.94
7.3.110.0150.00518.98
7.3.100.0040.01418.93
7.3.90.0090.01018.66
7.3.80.0060.01218.75
7.3.70.0140.00918.67
7.3.60.0120.01518.71
7.3.50.0230.00718.74
7.3.40.0130.01318.71
7.3.30.0070.01218.58
7.3.20.0060.01418.76
7.3.10.0040.01618.84
7.3.00.0160.01018.86
7.2.330.0130.01019.18
7.2.320.0100.01018.98
7.2.310.0130.00919.21
7.2.300.0130.01318.53
7.2.290.0120.00619.09
7.2.280.0030.01719.15
7.2.270.0060.01519.06
7.2.260.0120.01219.01
7.2.250.0090.00918.96
7.2.240.0060.01318.94
7.2.230.0130.00718.90
7.2.220.0090.00919.10
7.2.210.0160.00419.16
7.2.200.0140.01119.19
7.2.190.0180.01218.54
7.2.180.0120.01619.20
7.2.170.0080.01518.86
7.2.160.0110.00918.83
7.2.150.0150.00318.76
7.2.140.0100.01418.83
7.2.130.0210.00618.68
7.2.120.0080.01218.93
7.2.110.0140.01418.69
7.2.100.0160.01018.72
7.2.90.0090.01518.74
7.2.80.0040.01819.02
7.2.70.0140.00718.78
7.2.60.0120.00818.93
7.2.50.0090.01218.86
7.2.40.0070.01318.84
7.2.30.0060.01318.74
7.2.20.0080.01118.83
7.2.10.0130.00718.82
7.2.00.0100.01018.79

preferences:
26.25 ms | 403 KiB | 5 Q