3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = new SplFileObject('/a.txt'); $iterator = new DirectoryIterator('/'); while($iterator->valid()) { $file = $iterator->current(); echo $iterator->key() . " => " . $file->getFilename() . "\n"; $iterator->next(); }

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.70.0140.00416.75
8.3.60.0040.01116.75
8.3.50.0150.00621.94
8.3.40.0110.00419.00
8.3.30.0070.00719.04
8.3.20.0000.00820.16
8.3.10.0070.00023.67
8.3.00.0050.00319.25
8.2.180.0040.01118.66
8.2.170.0040.01122.96
8.2.160.0110.01120.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00222.13
8.2.110.0100.00022.14
8.2.100.0110.00519.51
8.2.90.0040.00419.08
8.2.80.0040.00417.97
8.2.70.0060.00317.61
8.2.60.0000.00817.80
8.2.50.0070.00318.07
8.2.40.0040.00419.82
8.2.30.0060.00318.02
8.2.20.0040.00417.70
8.2.10.0000.00818.05
8.2.00.0040.00417.74
8.1.280.0080.00625.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0050.00522.09
8.1.230.0090.00319.15
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.00916.99
8.1.190.0000.00917.22
8.1.180.0000.01018.89
8.1.170.0050.00318.57
8.1.160.0050.00221.96
8.1.150.0040.00418.45
8.1.140.0070.00017.22
8.1.130.0000.00717.74
8.1.120.0000.00817.41
8.1.110.0030.00617.43
8.1.100.0070.00017.25
8.1.90.0040.00417.26
8.1.80.0080.00017.32
8.1.70.0030.00317.23
8.1.60.0050.00517.53
8.1.50.0000.00717.34
8.1.40.0040.00417.53
8.1.30.0030.00617.38
8.1.20.0040.00417.55
8.1.10.0040.00417.58
8.1.00.0000.00717.46
8.0.300.0030.00518.77
8.0.290.0000.00717.05
8.0.280.0040.00418.45
8.0.270.0000.00717.12
8.0.260.0050.00317.21
8.0.250.0030.00316.98
8.0.240.0040.00416.88
8.0.230.0030.00616.91
8.0.220.0070.00016.92
8.0.210.0050.00216.95
8.0.200.0030.00316.86
8.0.190.0000.00816.98
8.0.180.0000.00816.86
8.0.170.0070.00016.94
8.0.160.0040.00417.02
8.0.150.0040.00416.93
8.0.140.0000.00816.80
8.0.130.0060.00013.36
8.0.120.0040.00416.81
8.0.110.0000.00816.75
8.0.100.0040.00416.79
8.0.90.0050.00216.97
8.0.80.0080.00716.90
8.0.70.0080.00016.90
8.0.60.0040.00416.96
8.0.50.0040.00416.77
8.0.30.0080.01017.06
8.0.20.0110.01417.40
8.0.10.0000.00816.90
8.0.00.0060.01216.93
7.4.330.0000.00515.00
7.4.320.0030.00316.32
7.4.300.0030.00316.54
7.4.290.0000.00716.56
7.4.280.0030.00316.58
7.4.270.0000.00716.39
7.4.260.0040.00416.41
7.4.250.0050.00316.43
7.4.240.0010.00616.48
7.4.230.0030.00316.36
7.4.220.0110.00816.42
7.4.210.0070.01116.53
7.4.200.0030.00316.20
7.4.190.0030.00316.50
7.4.160.0090.00616.44
7.4.150.0060.01317.40
7.4.140.0070.01117.86
7.4.130.0090.00916.47
7.4.120.0140.00516.41
7.4.110.0120.01216.53
7.4.100.0140.00316.54
7.4.90.0100.01016.39
7.4.80.0030.02019.39
7.4.70.0110.00616.47
7.4.60.0070.01116.42
7.4.50.0000.00616.47
7.4.40.0000.01616.49
7.4.30.0030.01916.13
7.4.00.0070.00715.23
7.3.330.0030.00313.11
7.3.320.0060.00013.13
7.3.310.0040.00316.22
7.3.300.0020.00516.32
7.3.290.0140.00316.26
7.3.280.0110.00816.34
7.3.270.0030.01417.40
7.3.260.0040.01216.34
7.3.250.0080.01016.60
7.3.240.0070.01416.32
7.3.230.0070.01016.48
7.3.210.0140.00416.19
7.3.200.0030.01719.39
7.3.190.0100.01316.38
7.3.180.0100.00716.54
7.3.170.0040.01116.59
7.3.160.0060.01016.62
7.3.120.0070.00714.83
7.2.330.0060.01216.28
7.2.320.0170.00016.41
7.2.310.0180.00716.46
7.2.300.0040.01116.24
7.2.290.0130.00816.44
7.2.60.0100.00316.63
7.2.00.0070.00719.32
7.1.200.0040.00815.80
7.1.70.0030.00717.11
7.1.60.0000.01117.15
7.1.50.0220.01634.39
7.1.00.0000.08022.40
7.0.200.0080.00016.73
7.0.140.0030.07322.15
7.0.60.0200.04319.91
7.0.50.0170.05317.84
7.0.40.0130.04319.90
7.0.30.0270.05320.01
7.0.20.0130.04320.21
7.0.10.0000.08720.18
7.0.00.0130.07320.09
5.6.280.0100.06721.02
5.6.210.0130.07320.52
5.6.200.0100.08318.18
5.6.190.0030.07720.39
5.6.180.0130.08020.47
5.6.170.0470.04320.47
5.6.160.0030.08320.44
5.6.150.0000.04718.14
5.6.140.0130.04318.24
5.6.130.0100.08018.11
5.6.120.0130.05020.98
5.6.110.0100.08320.88
5.6.100.0030.04721.10
5.6.90.0130.07720.98
5.6.80.0030.08020.48
5.5.350.4230.04320.49
5.5.340.0100.07718.08
5.5.330.0070.08720.21
5.5.320.0270.06320.32
5.5.310.0270.03720.25
5.5.300.0100.07317.98
5.5.290.0070.08017.99
5.5.280.0070.05020.65
5.5.270.0130.04020.85
5.5.260.0070.07720.88
5.5.250.0000.08320.68
5.5.240.0000.04020.15
5.4.450.0300.04720.77
5.4.440.0570.04320.77
5.4.430.0430.04020.77
5.4.420.0630.04320.77
5.4.410.0630.03720.77
5.4.400.0730.03720.77
5.4.390.0630.03720.77
5.4.380.0630.03020.77
5.4.370.0370.03720.77
5.4.360.0930.05320.77
5.4.350.0330.04320.77
5.4.340.0500.03720.77
5.4.320.0430.03721.03
5.4.310.0730.04321.03
5.4.300.0300.04321.03
5.4.290.0600.04321.03
5.4.280.0800.03321.03
5.4.270.0430.04021.03
5.4.260.0330.04021.03
5.4.250.0600.03321.03
5.4.240.0430.04021.03
5.4.230.0730.03721.03
5.4.220.0570.07021.03
5.4.210.0530.04321.03
5.4.200.0530.04021.03
5.4.190.0430.07721.03
5.4.180.0800.04320.78
5.4.170.0670.03720.78
5.4.160.0800.03320.78
5.4.150.0230.04720.78
5.4.140.0400.04020.78
5.4.130.0270.05320.78
5.4.120.0400.04020.78
5.4.110.0700.03720.78
5.4.100.0500.04320.78
5.4.90.0300.04320.78
5.4.80.0330.04020.78
5.4.70.0670.03020.78
5.4.60.0370.03720.78
5.4.50.0400.02720.78
5.4.40.0470.03320.78
5.4.30.0500.03320.78
5.4.20.0670.03320.78
5.4.10.0500.04020.78
5.4.00.0770.02720.78
5.3.290.0600.03721.03
5.3.280.0630.03721.03
5.3.270.0430.04320.78
5.3.260.0730.04020.78
5.3.250.0630.04020.78
5.3.240.0300.05720.78
5.3.230.0070.04320.78
5.3.220.0630.03320.78
5.3.210.0500.04020.78
5.3.200.0630.03320.78
5.3.190.0470.04020.78
5.3.180.1030.03320.78
5.3.170.0500.04720.78
5.3.160.0770.03320.78
5.3.150.1030.02320.78
5.3.140.0670.04020.78
5.3.130.0600.03320.78
5.3.120.0730.03720.78
5.3.110.0730.04020.78
5.3.100.0300.03720.78
5.3.90.0630.04020.78
5.3.80.0570.03020.78
5.3.70.0670.03720.78
5.3.60.0530.04020.78
5.3.50.0670.04020.78
5.3.40.0130.04320.78
5.3.30.0230.04320.78
5.3.20.0830.03020.78
5.3.10.0170.04320.78
5.3.00.0270.04320.78
5.2.170.0770.03320.78
5.2.160.0530.02320.78
5.2.150.0570.04320.78
5.2.140.0270.03720.78
5.2.130.0270.03320.78
5.2.120.0630.02020.78
5.2.110.0500.03320.78
5.2.100.0530.02720.78
5.2.90.0500.02720.78
5.2.80.0530.05720.78
5.2.70.0330.03020.78
5.2.60.0100.04720.78
5.2.50.0270.04320.78
5.2.40.0400.03720.78
5.2.30.0430.02320.78
5.2.20.0170.02720.78
5.2.10.0030.02720.78
5.2.00.0200.03020.78
5.1.60.0070.02320.78
5.1.50.0000.03320.78
5.1.40.0100.02320.78
5.1.30.0130.02720.78
5.1.20.0100.06020.78
5.1.10.0030.03020.78
5.1.00.0070.04020.78
5.0.50.0030.02720.78
5.0.40.0330.01720.78
5.0.30.0330.02320.67
5.0.20.0200.02720.67
5.0.10.0170.02320.67
5.0.00.0230.03020.67
4.4.90.0170.01720.78
4.4.80.0200.02020.78
4.4.70.0030.01720.78
4.4.60.0070.01720.78
4.4.50.0030.01020.78
4.4.40.0030.02320.78
4.4.30.0030.02720.78
4.4.20.0070.01720.78
4.4.10.0070.01320.78
4.4.00.0070.02020.78
4.3.110.0200.01720.67
4.3.100.0100.01720.67
4.3.90.0000.02020.67
4.3.80.0130.03320.67
4.3.70.0300.01720.67
4.3.60.0270.01720.67
4.3.50.0130.02320.67
4.3.40.0100.02320.67
4.3.30.0030.01720.67
4.3.20.0070.01320.67
4.3.10.0000.02320.67
4.3.00.0130.01720.67

preferences:
56.46 ms | 401 KiB | 5 Q