3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PriceList { /** * @var float[] */ protected $data = []; public function addPrice(float $price): void { $this->data[] = $price; } /** * @return float[] Array of prices */ public function all(): array { return $this->data; } } $priceList = new PriceList(); $priceList->addPrice(29.99); $priceList->addPrice(89); $priceList->addPrice(199); print_r($priceList->all());

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.0150.00318.27
8.3.50.0130.00716.51
8.3.40.0070.01418.62
8.3.30.0040.01118.71
8.3.20.0040.00421.95
8.3.10.0050.00320.59
8.3.00.0080.00019.26
8.2.180.0120.00318.29
8.2.170.0150.00322.96
8.2.160.0030.01622.96
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0070.00021.00
8.2.110.0000.00822.26
8.2.100.0040.00817.71
8.2.90.0070.00418.87
8.2.80.0040.00418.66
8.2.70.0050.00317.50
8.2.60.0040.00417.63
8.2.50.0000.00817.63
8.2.40.0040.00421.04
8.2.30.0000.00819.20
8.2.20.0040.00418.12
8.2.10.0040.00419.45
8.2.00.0030.00618.17
8.1.280.0100.01025.92
8.1.270.0070.00020.25
8.1.260.0050.00326.35
8.1.250.0100.00628.09
8.1.240.0040.00721.86
8.1.230.0090.00622.50
8.1.220.0000.00818.64
8.1.210.0040.00418.77
8.1.200.0060.00617.48
8.1.190.0090.00017.23
8.1.180.0030.00518.10
8.1.170.0000.00718.93
8.1.160.0070.00018.76
8.1.150.0030.00518.79
8.1.140.0040.00418.70
8.1.130.0070.00020.08
8.1.120.0040.00417.45
8.1.110.0080.00017.36
8.1.100.0040.00417.43
8.1.90.0040.00417.32
8.1.80.0000.00817.43
8.1.70.0050.00317.44
8.1.60.0000.00817.58
8.1.50.0050.00317.45
8.1.40.0040.00417.44
8.1.30.0040.00417.72
8.1.20.0000.00817.56
8.1.10.0000.00817.57
8.1.00.0040.00417.39
8.0.300.0000.00918.77
8.0.290.0000.00816.75
8.0.280.0070.00018.23
8.0.270.0050.00216.76
8.0.260.0060.00018.46
8.0.250.0030.00616.87
8.0.240.0000.00816.93
8.0.230.0030.00616.99
8.0.220.0070.00016.90
8.0.210.0030.00316.77
8.0.200.0030.00316.96
8.0.190.0000.00816.95
8.0.180.0030.00516.81
8.0.170.0040.00416.80
8.0.160.0000.00716.91
8.0.150.0060.00316.74
8.0.140.0070.00016.78
8.0.130.0060.00013.34
8.0.120.0070.00016.77
8.0.110.0040.00416.71
8.0.100.0020.00516.94
8.0.90.0070.00017.00
8.0.80.0020.01416.85
8.0.70.0040.00416.91
8.0.60.0040.00416.78
8.0.50.0080.00016.76
8.0.30.0130.00417.00
8.0.20.0160.00317.07
8.0.10.0070.00017.05
8.0.00.0100.00916.81
7.4.330.0040.00015.55
7.4.320.0030.00516.45
7.4.300.0000.00616.51
7.4.290.0000.00716.55
7.4.280.0040.00416.59
7.4.270.0000.00716.52
7.4.260.0080.00016.45
7.4.250.0030.00616.48
7.4.240.0040.00416.50
7.4.230.0030.00316.48
7.4.220.0080.00016.62
7.4.210.0050.01116.60
7.4.200.0050.00216.45
7.4.160.0070.01116.42
7.4.140.0070.01717.86
7.4.130.0100.01016.26
7.4.120.0130.00716.56
7.4.110.0090.01516.63
7.4.100.0130.00716.42
7.4.90.0060.01216.54
7.4.80.0090.01019.39
7.4.70.0140.00316.53
7.4.60.0080.00816.43
7.4.50.0000.01316.57
7.4.40.0070.00716.18
7.4.00.0040.01114.82
7.3.330.0030.00313.31
7.3.320.0030.00313.17
7.3.310.0000.00716.14
7.3.300.0030.00316.21
7.3.290.0040.00416.26
7.3.280.0090.00616.28
7.3.260.0100.00816.43
7.3.240.0090.01016.35
7.3.230.0100.00716.26
7.3.210.0060.01016.51
7.3.200.0030.01316.29
7.3.190.0110.01116.23
7.3.180.0120.00816.43
7.3.170.0090.00916.43
7.3.160.0060.01016.23
7.3.20.0390.00514.71
7.3.10.0500.00314.73
7.3.00.0370.00314.55
7.2.330.0090.00916.45
7.2.320.0160.00316.74
7.2.310.0100.00716.67
7.2.300.0030.01416.47
7.2.290.0100.00816.41
7.2.150.0300.00315.00
7.2.140.0390.01015.04
7.2.130.0330.00315.30
7.2.120.0360.00714.88
7.2.110.0400.01015.09
7.2.100.0370.00714.76
7.2.90.0270.00314.93
7.2.80.0360.00715.02
7.2.70.0240.00714.91
7.2.60.0250.00614.80
7.2.50.0230.01015.14
7.2.40.0360.00315.09
7.2.30.0310.00614.82
7.2.20.0250.00714.89
7.2.10.0310.00314.93
7.2.00.0560.00015.02
7.1.250.0220.00613.88

preferences:
69.43 ms | 400 KiB | 5 Q