3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rec($dir, $depth, $root) { $dir = dir('/dev/fd'); while ($entry = $dir->read()) { echo $depth . $entry . "\n"; if (is_dir($root . $entry)) { rec($dir, $depth . " ", $root . '/' . $entry); } } } rec('/', '', '/');

Abusive script

This script was stopped while abusing our resources

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.0.120.0120.00316.24
8.0.110.0130.00616.68
8.0.100.0160.00316.61
8.0.90.0130.00416.79
8.0.80.0130.00716.72
8.0.70.0180.00216.69
8.0.60.0100.00716.71
8.0.50.0150.00516.64
8.0.30.0190.00516.77
8.0.20.0120.00917.11
8.0.10.0140.00616.79
8.0.00.0140.00916.61
7.4.250.0150.00116.39
7.4.240.0100.00616.46
7.4.230.0180.00016.45
7.4.220.0170.00716.47
7.4.210.0170.00016.41
7.4.200.0080.00516.31
7.4.190.0240.00316.52
7.4.180.0170.00316.29
7.4.160.0130.00616.50
7.4.150.0160.00416.81
7.4.140.0170.00717.28
7.4.130.0140.00616.53
7.4.120.0100.01116.52
7.4.110.0150.00516.38
7.4.100.0120.01016.45
7.4.90.0110.00716.30
7.4.80.0140.00717.76
7.4.70.0130.00816.35
7.4.60.0140.00516.31
7.4.50.0130.00216.47
7.4.40.0160.00616.37
7.4.30.0170.00416.33
7.4.20.0220.00015.93
7.4.10.0260.00016.31
7.4.00.0220.00316.24
7.3.310.0100.00616.36
7.3.300.0160.00216.18
7.3.290.0130.00516.40
7.3.280.0100.00716.36
7.3.270.0140.00516.71
7.3.260.0160.00516.34
7.3.250.0110.00816.51
7.3.240.0180.00516.39
7.3.230.0160.00616.34
7.3.220.0270.00015.98
7.3.210.0200.00216.37
7.3.200.0150.00317.58
7.3.190.0190.00316.24
7.3.180.0150.00616.23
7.3.170.0130.00816.25
7.3.160.0110.01016.26
7.3.150.0230.00316.38
7.3.140.0260.00016.13
7.3.130.0150.00616.18
7.3.120.0170.00315.91
7.3.110.0170.00315.77
7.3.100.0240.00015.64
7.3.90.0260.00016.50
7.3.80.0090.01215.95
7.3.70.0240.00316.31
7.3.60.0270.00016.36
7.3.50.0230.00016.60
7.3.40.0220.00316.63
7.3.30.0240.00316.64
7.3.20.0260.00017.68
7.3.10.0180.00617.54
7.3.00.0270.00017.48
7.2.340.0210.00415.85
7.2.330.0270.01616.49
7.2.320.0160.00616.33
7.2.310.0130.01016.31
7.2.300.0150.00716.39
7.2.290.0140.00816.54
7.2.280.0190.00816.52
7.2.270.0200.00716.15
7.2.260.0290.00316.25
7.2.250.0230.00316.37
7.2.240.0200.00815.98
7.2.230.0220.00415.89
7.2.220.0180.00715.93
7.2.210.0290.00416.40
7.2.200.0270.00516.60
7.2.190.0260.00015.93
7.2.180.0290.00416.49
7.2.170.0290.00316.63
7.2.160.0260.00016.43
7.2.150.0220.00717.49
7.2.140.0260.00017.68
7.2.130.0240.00517.62
7.2.120.0200.00317.27
7.2.110.0270.00617.34
7.2.100.0190.00717.13
7.2.90.0210.00316.99
7.2.80.0180.00417.22
7.2.70.0360.00917.10
7.2.60.0190.00717.26
7.2.50.0200.00317.34
7.2.40.0170.00917.14
7.2.30.0160.00617.34
7.2.20.0250.00317.26
7.2.10.0210.00717.28
7.2.00.0280.00719.22
7.1.330.0220.00916.92
7.1.320.0260.00017.01
7.1.310.0200.00617.00
7.1.300.0210.00616.93
7.1.290.0280.00416.66
7.1.280.0180.00916.69
7.1.270.0170.00916.68
7.1.260.0270.00416.84
7.1.250.0290.00316.94
7.1.240.0250.00316.16
7.1.230.0180.00616.30
7.1.220.0180.00616.32
7.1.210.0300.00516.03
7.1.200.0190.00515.99
7.1.190.0230.00316.13
7.1.180.0190.00516.14
7.1.170.0200.00316.18
7.1.160.0240.00416.13
7.1.150.0290.00316.13
7.1.140.0340.00316.18
7.1.130.0160.00316.11
7.1.120.0200.00116.48
7.1.110.0190.00616.36
7.1.100.0190.00618.13
7.1.90.0180.00616.26
7.1.80.0170.00616.42
7.1.70.0180.00717.10
7.1.60.0280.00217.96
7.1.50.0300.00417.70
7.1.40.0200.00516.28
7.1.30.0220.00316.32
7.1.20.0250.00616.33
7.1.10.0270.00616.29
7.1.00.0250.00616.30
7.0.330.0240.00216.84
7.0.320.0270.00715.70
7.0.310.0220.00616.03
7.0.300.0220.00615.93
7.0.290.0150.00615.74
7.0.280.0180.00215.90
7.0.270.0190.00516.08
7.0.260.0220.00215.85
7.0.250.0180.00616.08
7.0.240.0300.00516.12
7.0.230.0190.00416.03
7.0.220.0200.00516.15
7.0.210.0160.00616.23
7.0.200.0260.00816.81
7.0.190.0270.00816.19
7.0.180.0190.00316.09
7.0.170.0360.00216.16
7.0.160.0360.00616.13
7.0.150.0350.00115.81
7.0.140.0270.00415.97
7.0.130.0230.00315.85
7.0.120.0200.00416.19
7.0.110.0340.00215.95
7.0.100.0280.00316.10
7.0.90.0250.00415.96
7.0.80.0250.00015.39
7.0.70.0180.00315.58
7.0.60.0170.01115.29
7.0.50.0390.00015.35
7.0.40.0110.00413.20
7.0.30.0060.00913.25
7.0.20.0080.00513.38
7.0.10.0060.01013.14
7.0.00.0090.00413.45
5.6.380.0110.00414.24
5.6.370.0140.00614.14
5.6.360.0000.01913.92
5.6.350.0130.00414.19
5.6.340.0180.00714.23
5.6.330.0090.00914.20
5.6.320.0070.00813.95
5.6.310.0080.01214.31
5.6.300.0110.00714.41
5.6.290.0100.00714.01
5.6.280.0100.00314.16
5.6.270.0080.00814.19
5.6.260.0000.01514.23
5.6.250.0030.01214.21
5.6.240.0050.00814.20
5.6.230.0080.00414.18
5.6.220.0150.00014.27
5.6.210.0130.00014.34
5.6.200.0090.00614.21
5.6.190.0110.00814.17
5.6.180.0150.00714.30
5.6.170.0050.00814.16
5.6.160.0120.00314.08
5.6.150.0080.00814.17
5.6.140.0040.00814.18
5.6.130.0110.00414.01
5.6.120.0120.00514.28
5.6.110.0090.00314.31
5.6.100.0000.01214.17
5.6.90.0140.00014.23
5.6.80.0070.00714.16
5.6.70.0080.00814.07
5.6.60.0110.00314.17
5.6.50.0070.00514.01
5.6.40.0050.00514.20
5.6.30.0100.00313.96
5.6.20.0040.00714.24
5.6.10.0140.00014.24
5.6.00.0070.00514.21
5.5.380.0360.00315.20
5.5.370.0440.00716.09
5.5.360.0380.01015.94
5.5.350.0350.00916.05
5.5.340.0390.00315.95
5.5.330.0330.00715.98
5.5.320.0370.00915.44
5.5.310.0320.00915.58
5.5.300.0420.00016.28
5.5.290.0360.00615.65
5.5.280.0380.00315.64
5.5.270.0350.01016.03
5.5.260.0340.00916.35
5.5.250.0280.01116.27
5.5.240.0290.01015.94
5.5.230.0320.01415.63
5.5.220.0370.00716.19
5.5.210.0390.00615.73
5.5.200.0410.00915.33
5.5.190.0310.01015.75
5.5.180.0330.00616.04
5.5.170.0080.00513.92
5.5.160.0410.00715.53
5.5.150.0440.00716.17
5.5.140.0390.00416.13
5.5.130.0320.00915.99
5.5.120.0460.00015.43
5.5.110.0410.00015.50
5.5.100.0400.00316.02
5.5.90.0430.00015.69
5.5.80.0400.00316.16
5.5.70.0460.00316.14
5.5.60.0360.00715.89
5.5.50.0370.00415.87
5.5.40.0330.00615.75
5.5.30.0330.01115.91
5.5.20.0350.00615.75
5.5.10.0290.01616.14
5.5.00.0370.00716.03
5.4.450.0320.01015.63
5.4.440.0370.00715.16
5.4.430.0370.00716.26
5.4.420.0290.01315.81
5.4.410.0350.00616.05
5.4.400.0310.01414.84
5.4.390.0280.01215.09
5.4.380.0280.01615.77
5.4.370.0310.01016.04
5.4.360.0450.00715.86
5.4.350.0400.00715.33
5.4.340.0320.01115.54
5.4.330.0380.00414.66
5.4.320.0410.00615.09
5.4.310.0380.00315.29
5.4.300.0410.00315.50
5.4.290.0310.01016.13
5.4.280.0350.01016.12
5.4.270.0330.00615.94
5.4.260.0240.01415.41
5.4.250.0340.00916.01
5.4.240.0430.00016.20
5.4.230.0420.01315.66
5.4.220.0330.00715.62
5.4.210.0360.00715.57
5.4.200.0370.01015.75
5.4.190.0350.01315.61
5.4.180.0400.00316.17
5.4.170.0370.01015.67
5.4.160.0440.00615.66
5.4.150.0460.00315.70
5.4.140.0280.01415.84
5.4.130.0410.00016.28
5.4.120.0410.00416.13
5.4.110.0300.01215.11
5.4.100.0250.01215.09
5.4.90.0380.01015.97
5.4.80.0480.00315.25
5.4.70.0370.01115.65
5.4.60.0340.00915.97
5.4.50.0400.00015.89
5.4.40.0350.00315.76
5.4.30.0360.00415.61
5.4.20.0320.00615.99
5.4.10.0340.00616.04
5.4.00.0330.01016.11

preferences:
46.56 ms | 401 KiB | 5 Q