3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements IteratorAggregate { protected $attributes = []; function __construct(array $arr) { $this->attributes = $arr; } function getIterator(): \Traversable { return new ArrayIterator($this->attributes); } } (new Foo([]))[0];

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.0040.00519.64
8.4.110.0130.00818.27
8.4.100.0170.00717.85
8.4.90.0070.00320.71
8.4.80.0050.01218.79
8.4.70.0030.00520.43
8.4.60.0110.00920.52
8.4.50.0140.00620.63
8.4.40.0170.00317.83
8.4.30.0080.01118.89
8.4.20.0100.01019.61
8.4.10.0080.01219.61
8.3.250.0110.00818.70
8.3.240.0120.00716.67
8.3.230.0130.00716.95
8.3.220.0050.00319.09
8.3.210.0130.00916.90
8.3.200.0050.00416.87
8.3.190.0070.00516.98
8.3.180.0030.00518.91
8.3.170.0060.01217.00
8.3.160.0070.01118.41
8.3.150.0060.00318.59
8.3.140.0080.00020.91
8.3.130.0080.00018.41
8.3.120.0080.01120.84
8.3.110.0190.00020.94
8.3.100.0090.00916.77
8.3.90.0120.00316.95
8.3.80.0000.00918.43
8.3.70.0070.01118.40
8.3.60.0440.01025.92
8.3.50.0090.01125.92
8.3.40.0360.01125.92
8.3.30.0370.01025.92
8.3.20.0380.01025.92
8.3.10.0410.00625.92
8.3.00.0440.00325.92
8.2.290.0060.00316.79
8.2.280.0110.00818.68
8.2.270.0080.00016.70
8.2.260.0100.00717.04
8.2.250.0040.00718.62
8.2.240.0130.00016.76
8.2.230.0030.00622.58
8.2.220.0190.00424.06
8.2.210.0080.00026.77
8.2.200.0090.00016.50
8.2.190.0090.00916.63
8.2.180.0360.00825.92
8.2.170.0390.00725.92
8.2.160.0450.00525.92
8.2.150.0360.01025.92
8.2.140.0400.00925.92
8.2.130.0350.01225.92
8.2.120.0370.01325.92
8.2.110.0420.00625.92
8.2.100.0360.01025.92
8.2.90.0380.00625.92
8.2.80.0360.00925.92
8.2.70.0390.00825.92
8.2.60.0330.01425.92
8.2.50.0390.00825.92
8.2.40.0370.00925.92
8.2.30.0350.01025.92
8.2.20.0420.00725.92
8.2.10.0330.01025.92
8.2.00.0360.00825.92
8.1.330.0130.00516.24
8.1.320.0090.00916.14
8.1.310.0140.00318.51
8.1.300.0060.01316.07
8.1.290.0060.00318.88
8.1.280.0400.00725.92
8.1.270.0460.00725.92
8.1.260.0380.01125.92
8.1.250.0370.01125.92
8.1.240.0370.00525.92
8.1.230.0390.00825.92
8.1.220.0350.01125.92
8.1.210.0400.00725.92
8.1.200.0300.01725.92
8.1.190.0350.01325.92
8.1.180.0380.00625.92
8.1.170.0490.00225.92
8.1.160.0390.00725.92
8.1.150.0380.00325.92
8.1.140.0270.01125.92
8.1.130.0310.00925.92
8.1.120.0360.00625.92
8.1.110.0320.01025.92
8.1.100.0320.00725.92
8.1.90.0360.00725.92
8.1.80.0340.00925.92
8.1.70.0310.01025.92
8.1.60.0390.00925.92
8.1.50.0420.00425.92
8.1.40.0390.00825.92
8.1.30.0430.00725.92
8.1.20.0350.01325.92
8.1.10.0350.01025.92
8.1.00.0400.00925.92

preferences:
25.9 ms | 403 KiB | 5 Q