3v4l.org

run code in 300+ PHP versions simultaneously
<?php // repertoire a scanner : $dir= "/var/www/stock/downloads"; // comparateur de date function dateComparator($a, $b) { if ($a['date_modification'] == $b['date_modification']) return 0; return ($b['date_modification'] < $a['date_modification']) ? -1 : 1; } // scan du repertoire $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::CHILD_FIRST); $fichiers=array(); foreach ($iterator as $path) { // si il s'agit d'un fichier if ($path->isFile()) { $nom = pathinfo($path->__toString(), PATHINFO_BASENAME); if ($nom != '`^\.`' ) { // on cree une matrice d'informations sur le fichier $fichiers[]= array( "nom" => $nom, "date_modification" => filemtime($path) ); } } } // tri par date usort($fichiers, 'dateComparator'); $fichiers = array_slice($fichiers, 0, 20); // affichage du tableau de fichiers apres tri par date echo "<h3>Derniers fichiers téléchargés : </h3>"; echo "<hr/>"; foreach($fichiers as $key => $item) { echo "[".$key."] ".date("d/m/Y H:i:s", $item['date_modification'])." | ".$item['nom']."<br/>"; } echo "<hr/>"; ?>

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.0040.01118.43
8.3.50.0230.01121.92
8.3.40.0160.00018.63
8.3.30.0110.00418.66
8.3.20.0000.00820.29
8.3.10.0000.00820.67
8.3.00.0050.00523.61
8.2.180.0160.00617.00
8.2.170.0130.00322.96
8.2.160.0030.01022.09
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0040.00420.86
8.2.120.0000.00726.35
8.2.110.0110.00022.30
8.2.100.0090.00317.70
8.2.90.0050.00318.22
8.2.80.0030.00617.97
8.2.70.0030.00617.38
8.2.60.0040.00417.80
8.2.50.0030.00618.09
8.2.40.0030.00620.45
8.2.30.0000.00719.51
8.2.20.0000.00717.73
8.2.10.0000.00718.07
8.2.00.0080.00018.11
8.1.280.0090.00925.92
8.1.270.0040.00424.01
8.1.260.0080.00828.09
8.1.250.0030.00628.09
8.1.240.0000.00923.83
8.1.230.0040.00820.96
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0060.00317.23
8.1.190.0080.00017.36
8.1.180.0000.00818.10
8.1.170.0030.00518.57
8.1.160.0040.00420.74
8.1.150.0040.00418.88
8.1.140.0030.00519.50
8.1.130.0070.00017.65
8.1.120.0040.00417.36
8.1.110.0030.00617.45
8.1.100.0000.00817.37
8.1.90.0030.00517.34
8.1.80.0040.00417.48
8.1.70.0070.00017.33
8.1.60.0080.00017.59
8.1.50.0080.00017.60
8.1.40.0040.00417.47
8.1.30.0060.00317.60
8.1.20.0050.00317.48
8.1.10.0050.00317.59
8.1.00.0050.00317.57
8.0.300.0080.00020.09
8.0.290.0050.00216.75
8.0.280.0000.00818.30
8.0.270.0040.00417.24
8.0.260.0030.00317.16
8.0.250.0000.00816.96
8.0.240.0060.00016.88
8.0.230.0050.00217.01
8.0.220.0070.00016.95
8.0.210.0030.00316.92
8.0.200.0050.00316.91
8.0.190.0040.00416.89
8.0.180.0040.00416.92
8.0.170.0060.00316.96
8.0.160.0000.00816.83
8.0.150.0030.00616.98
8.0.140.0000.00716.80
8.0.130.0000.00513.38
8.0.120.0000.00816.77
8.0.110.0040.00416.83
8.0.100.0000.00816.81
8.0.90.0000.00716.91
8.0.80.0050.01016.98
8.0.70.0000.00716.73
8.0.60.0040.00416.83
8.0.50.0030.00616.96
8.0.30.0090.01017.15
8.0.20.0080.01117.40
8.0.10.0040.00416.93
8.0.00.0110.00716.64
7.4.330.0020.00216.77
7.4.320.0080.00016.58
7.4.300.0000.00616.66
7.4.290.0070.00016.63
7.4.280.0040.00416.63
7.4.270.0090.00016.56
7.4.260.0090.00016.64
7.4.250.0040.00416.52
7.4.240.0030.00316.64
7.4.230.0070.00016.46
7.4.220.0120.01016.68
7.4.210.0100.00916.60
7.4.200.0070.00016.74
7.4.160.0130.00316.53
7.4.150.0150.00317.40
7.4.140.0120.00917.86
7.4.130.0090.01016.58
7.4.120.0110.00816.81
7.4.110.0090.01516.59
7.4.100.0100.00716.77
7.4.90.0030.01516.70
7.4.80.0130.00919.39
7.4.70.0140.00316.63
7.4.60.0080.00816.41
7.4.50.0060.00916.35
7.4.40.0100.00716.61
7.4.30.0090.00916.57
7.4.00.0100.00715.28
7.3.330.0000.00513.14
7.3.320.0030.00313.31
7.3.310.0050.00216.17
7.3.300.0030.00316.32
7.3.290.0030.00516.31
7.3.280.0100.00816.36
7.3.270.0140.00317.40
7.3.260.0100.00716.43
7.3.250.0090.01216.47
7.3.240.0110.00816.54
7.3.230.0100.01116.39
7.3.210.0080.00816.48
7.3.200.0120.00919.39
7.3.190.0000.01716.31
7.3.180.0120.00416.64
7.3.170.0080.00816.29
7.3.160.0130.00616.54
7.3.120.0100.00714.46
7.3.110.0060.00914.44
7.3.100.0040.00714.73
7.3.90.0040.01114.54
7.3.80.0070.01014.70
7.3.70.0070.00714.57
7.3.60.0030.01214.89
7.3.50.0070.01014.87
7.3.40.0030.01414.65
7.3.30.0090.00614.50
7.3.20.0070.00416.65
7.3.10.0050.01016.22
7.3.00.0130.00516.21
7.2.330.0070.01016.63
7.2.320.0110.00716.40
7.2.310.0040.01416.30
7.2.300.0140.00316.57
7.2.290.0130.00316.34
7.2.240.0070.00714.95
7.2.230.0040.01215.00
7.2.220.0060.00814.84
7.2.210.0040.01114.86
7.2.200.0070.00414.90
7.2.190.0070.00314.81
7.2.180.0040.00714.82
7.2.170.0030.01014.84
7.2.160.0070.00414.75
7.2.150.0040.01216.67
7.2.140.0070.00316.77
7.2.130.0120.00716.38
7.2.120.0150.00516.56
7.2.110.0130.00716.38
7.2.100.0070.01216.53
7.2.90.0120.00616.41
7.2.80.0100.00816.41
7.2.70.0110.01116.35
7.2.60.0040.01216.75
7.2.50.0070.01216.62
7.2.40.0150.00316.60
7.2.30.0090.01016.54
7.2.20.0120.01016.54
7.2.10.0120.00616.76
7.2.00.0080.00917.38
7.1.330.0060.00915.74
7.1.320.0120.00415.71
7.1.310.0110.00415.78
7.1.300.0070.00715.74
7.1.290.0090.00615.68
7.1.280.0040.01115.71
7.1.270.0070.00715.66
7.1.260.0100.00615.61
7.1.250.0060.01015.30
7.1.200.0140.00715.57
7.1.100.0040.00718.28
7.1.70.0040.01217.16
7.1.60.0110.01519.40
7.1.50.0030.01516.63
7.1.00.0070.07322.35
7.0.200.0470.00714.35
7.0.100.0000.04719.93
7.0.90.0170.08019.88
7.0.80.0100.08019.89
7.0.70.0130.07319.87
7.0.60.0130.05719.88
7.0.50.0070.04020.36
7.0.40.0070.08320.12
7.0.30.0070.08020.04
7.0.20.0100.08020.10
7.0.10.0130.06020.11
7.0.00.0070.04020.13
5.6.280.0000.07021.10
5.6.250.0070.06320.67
5.6.240.0070.08320.64
5.6.230.0030.08020.67
5.6.220.0170.06020.63
5.6.210.0100.04320.57
5.6.200.0100.05321.11
5.6.190.0130.08021.03
5.6.180.0130.06321.04
5.6.170.0000.05321.16
5.6.160.0030.04321.04
5.6.150.0000.05720.98
5.6.140.0100.08320.95
5.6.130.0070.08321.14
5.6.120.0100.08021.13
5.6.110.0030.07720.93
5.6.100.0070.08321.01
5.6.90.0030.05021.03
5.6.80.0030.07720.45
5.6.70.0070.07720.43
5.6.60.0230.07320.33
5.6.50.0070.05720.55
5.6.40.0070.07020.53
5.6.30.0070.04020.45
5.6.20.0100.04720.38
5.6.10.0130.06020.32
5.6.00.0170.06320.45
5.5.380.0000.04320.43
5.5.370.0070.06020.43
5.5.360.0000.08020.42
5.5.350.0100.07020.45
5.5.340.0130.05320.88
5.5.330.0100.06720.84
5.5.320.0070.08320.74
5.5.310.0100.07720.78
5.5.300.0100.06020.93
5.5.290.0070.05020.94
5.5.280.0100.06320.86
5.5.270.0000.09320.89
5.5.260.0030.07320.83
5.5.250.0070.07320.59
5.5.240.0030.07320.31
5.5.230.0070.06020.17
5.5.220.0070.08320.27
5.5.210.0000.06720.30
5.5.200.0100.07720.22
5.5.190.0070.08020.24
5.5.180.0130.06020.12
5.5.160.0070.04320.14
5.5.150.0170.05720.28
5.5.140.0030.07020.19
5.5.130.0030.07020.25
5.5.120.0000.06720.27
5.5.110.0000.04720.00
5.5.100.0030.05020.13
5.5.90.0030.07320.17
5.5.80.0070.04020.12
5.5.70.0170.06720.06
5.5.60.0100.07320.06
5.5.50.0170.06720.14
5.5.40.0100.06020.00
5.5.30.0100.07720.01
5.5.20.0000.05320.06
5.5.10.0030.04020.04
5.5.00.0000.07020.04

preferences:
48.33 ms | 401 KiB | 5 Q