3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class MyFile { private $filename; private $mimeType; public function __construct($filename, $mimeType) { $this->filename = $filename; $this->mimeType = $mimeType; } public function getFilename() { return $this->filename; } public function getMimeType() { return $this->mimeType; } } $array1[] = new MyFile("peter.jpg", "image/jpg"); $array1[] = new MyFile("peter.jpg", "image/png"); $array1[] = new MyFile("michal.jpg", "image/jpg"); $array2[] = new MyFile("johan.jpg", "image/jpg"); $array2[] = new MyFile("peter.jpg", "image/jpg"); $diffArray = array_udiff($array1, $array2, 'compareFiles'); function compareFiles($a, $b) { if ($a->getFilename() < $b->getFilename()) { return -1; } elseif ($a->getFilename() > $b->getFilename()) { return 1; } else { return 0; } } var_dump($diffArray);

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.0140.00316.63
8.3.50.0080.00822.05
8.3.40.0080.00818.84
8.3.30.0000.01419.09
8.3.20.0040.00420.17
8.3.10.0060.00323.48
8.3.00.0040.00419.69
8.2.180.0110.00718.41
8.2.170.0100.00722.96
8.2.160.0130.00320.39
8.2.150.0050.00324.18
8.2.140.0110.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00019.22
8.2.110.0030.00622.23
8.2.100.0080.00417.72
8.2.90.0050.00319.36
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0060.00817.89
8.2.50.0000.00918.07
8.2.40.0000.00819.84
8.2.30.0080.00018.38
8.2.20.0040.00417.75
8.2.10.0050.00318.14
8.2.00.0030.00617.72
8.1.280.0060.00925.92
8.1.270.0040.00423.81
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0090.00023.92
8.1.230.0100.00019.24
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.25
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0060.00618.49
8.1.160.0030.00522.10
8.1.150.0050.00218.58
8.1.140.0040.00417.52
8.1.130.0000.00717.86
8.1.120.0050.00217.54
8.1.110.0040.00417.39
8.1.100.0000.00817.39
8.1.90.0000.00717.50
8.1.80.0040.00417.49
8.1.70.0000.00717.49
8.1.60.0040.00417.65
8.1.50.0000.00817.55
8.1.40.0070.00017.61
8.1.30.0000.00817.62
8.1.20.0080.00017.65
8.1.10.0000.00917.55
8.1.00.0040.00417.55
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0070.00018.50
8.0.270.0070.00017.30
8.0.260.0000.00617.18
8.0.250.0080.00016.90
8.0.240.0000.01016.98
8.0.230.0050.00316.96
8.0.220.0070.00016.96
8.0.210.0000.00616.89
8.0.200.0000.00616.90
8.0.190.0000.00717.03
8.0.180.0040.00416.95
8.0.170.0040.00417.02
8.0.160.0070.00016.91
8.0.150.0000.00816.91
8.0.140.0000.00716.91
8.0.130.0000.00513.32
8.0.120.0040.00416.88
8.0.110.0070.00016.97
8.0.100.0020.00516.88
8.0.90.0040.00416.83
8.0.80.0150.00716.94
8.0.70.0040.00416.73
8.0.60.0000.00716.97
8.0.50.0040.00417.00
8.0.30.0100.00917.16
8.0.20.0140.00517.40
8.0.10.0070.00017.16
8.0.00.0080.01216.74
7.4.330.0000.00615.03
7.4.320.0000.00816.55
7.4.300.0040.00416.55
7.4.290.0030.00316.63
7.4.280.0060.00316.38
7.4.270.0000.00716.64
7.4.260.0030.00716.63
7.4.250.0040.00416.46
7.4.240.0030.00316.65
7.4.230.0030.00316.38
7.4.220.0080.01516.59
7.4.210.0060.01316.64
7.4.200.0030.00316.29
7.4.160.0130.00316.52
7.4.150.0210.00317.40
7.4.140.0080.01117.86
7.4.130.0110.00716.49
7.4.120.0070.01116.57
7.4.110.0040.01216.53
7.4.100.0040.01416.48
7.4.90.0130.00316.50
7.4.80.0110.00819.39
7.4.70.0040.01416.54
7.4.60.0090.00916.59
7.4.50.0000.00416.70
7.4.40.0120.00916.61
7.4.30.0060.01316.39
7.4.00.0060.01015.07
7.3.330.0020.00213.31
7.3.320.0000.00513.20
7.3.310.0020.00516.23
7.3.300.0000.00716.38
7.3.290.0090.01716.35
7.3.280.0090.00816.35
7.3.270.0030.01417.40
7.3.260.0160.00616.31
7.3.250.0090.00816.33
7.3.240.0090.00916.50
7.3.230.0090.00616.39
7.3.210.0120.00916.39
7.3.200.0110.01119.39
7.3.190.0090.00816.26
7.3.180.0030.01416.34
7.3.170.0080.00816.36
7.3.160.0130.00716.40
7.3.120.0120.00314.84
7.3.110.0060.00615.01
7.3.100.0100.00715.10
7.3.90.0110.00014.78
7.3.80.0040.01415.05
7.3.70.0040.01214.96
7.3.60.0030.01314.91
7.3.50.0040.01114.80
7.3.40.0060.00914.61
7.3.30.0090.00314.93
7.3.20.0090.00616.75
7.3.10.0000.01416.66
7.3.00.0030.01116.64
7.2.330.0130.00316.60
7.2.320.0030.01716.81
7.2.310.0070.01016.79
7.2.300.0080.00816.68
7.2.290.0060.01016.34
7.2.240.0030.01015.12
7.2.230.0000.01514.89
7.2.220.0090.00615.12
7.2.210.0100.00315.23
7.2.200.0040.01514.86
7.2.190.0030.01415.23
7.2.180.0030.01315.17
7.2.170.0060.00915.11
7.2.160.0100.00615.21
7.2.150.0070.01016.74
7.2.140.0140.00316.73
7.2.130.0070.01116.90
7.2.120.0030.01316.63
7.2.110.0030.01016.86
7.2.100.0070.01016.93
7.2.90.0000.01116.73
7.2.80.0030.01016.63
7.2.70.0000.01716.73
7.2.60.0120.00316.85
7.2.50.0040.00817.01
7.2.40.0000.01816.84
7.2.30.0060.01217.00
7.2.20.0030.00916.80
7.2.10.0030.01016.83
7.2.00.0000.01717.12
7.1.330.0070.00715.83
7.1.320.0000.01315.90
7.1.310.0000.01615.70
7.1.300.0000.01415.80
7.1.290.0030.01015.86
7.1.280.0000.01515.88
7.1.270.0030.01315.55
7.1.260.0000.01815.61
7.1.250.0100.00715.98
7.1.70.0000.00717.15
7.1.60.0090.00919.70
7.1.50.0150.00917.01
7.1.00.0070.07322.45
7.0.200.0030.00916.74
7.0.140.0000.07722.10
7.0.110.0800.07719.91
7.0.100.0630.08020.07
7.0.90.0630.06319.89
7.0.80.0500.08320.08
7.0.70.0600.06319.96
7.0.60.0530.08319.92
7.0.50.0330.08320.32
7.0.40.0100.04720.20
7.0.30.0200.07020.29
7.0.20.0100.07020.08
7.0.10.0100.05020.27
7.0.00.0100.07720.25
5.6.280.0130.06320.90
5.6.260.0070.08020.85
5.6.250.0070.07020.69
5.6.240.0130.08020.70
5.6.230.0030.07020.68
5.6.220.0100.07720.69
5.6.210.0070.07020.69
5.6.200.0100.06020.96
5.6.190.0030.08021.09
5.6.180.0100.08021.06
5.6.170.0100.08321.13
5.6.160.0130.07721.27
5.6.150.0030.08321.20
5.6.140.0130.06020.99
5.6.130.0070.09021.06
5.6.120.0070.08321.08
5.6.110.0130.07721.02
5.6.100.0130.07021.14
5.6.90.0130.06721.18
5.6.80.0070.07720.48
5.6.70.0070.05720.41
5.6.60.0030.08320.34
5.6.50.0070.08320.35
5.6.40.0000.06020.43
5.6.30.0070.07720.49
5.6.20.0170.07020.48
5.6.10.0170.07720.34
5.6.00.0100.07720.49
5.5.380.0070.07320.30
5.5.370.0100.08320.36
5.5.360.0030.08320.56
5.5.350.0000.08320.44
5.5.340.0170.07720.90
5.5.330.0130.07720.88
5.5.320.0200.06720.98
5.5.310.0000.05721.05
5.5.300.0130.07020.84
5.5.290.0200.07321.00
5.5.280.0100.07720.85
5.5.270.0100.07720.95
5.5.260.0100.07020.70
5.5.250.0170.07320.77
5.5.240.0070.08020.34
5.5.230.0100.07720.33
5.5.220.0000.08320.33
5.5.210.0230.06720.23
5.5.200.0030.08320.40
5.5.190.0100.07720.33
5.5.180.0100.07720.17
5.5.160.0100.04320.40
5.5.150.0200.06020.39
5.5.140.0130.07320.13
5.5.130.0070.08320.09
5.5.120.0070.08020.30
5.5.110.0070.08020.13
5.5.100.0070.08020.00
5.5.90.0070.05020.05
5.5.80.0070.07720.26
5.5.70.0030.08320.02
5.5.60.0200.06320.00
5.5.50.0100.07020.04
5.5.40.0230.05720.10
5.5.30.0030.07720.20
5.5.20.0070.04320.09
5.5.10.0030.04720.02
5.5.00.0070.07020.18
5.4.450.0070.07719.28
5.4.440.0000.07719.34
5.4.430.0130.07019.50
5.4.420.0170.06719.31
5.4.410.0170.06719.18
5.4.400.0100.07319.17
5.4.390.0100.07319.03
5.4.380.0100.07319.19
5.4.370.0000.08019.25
5.4.360.0100.07319.01
5.4.350.0070.07319.14
5.4.340.0000.05319.03
5.4.320.0030.07319.32
5.4.310.0030.07018.98
5.4.300.0170.06018.98
5.4.290.0000.07719.18
5.4.280.0100.07319.01
5.4.270.0100.07318.98
5.4.260.0030.04719.02
5.4.250.0000.08719.32
5.4.240.0100.07719.13
5.4.230.0130.07318.98
5.4.220.0230.06319.20
5.4.210.0070.07318.98
5.4.200.0070.07319.18
5.4.190.0070.07719.08
5.4.180.0000.05019.22
5.4.170.0030.07018.95
5.4.160.0030.08019.06
5.4.150.0070.06319.18
5.4.140.0070.04316.65
5.4.130.0070.04016.69
5.4.120.0130.06716.38
5.4.110.0030.05316.60
5.4.100.0030.07716.37
5.4.90.0070.06716.63
5.4.80.0030.06716.50
5.4.70.0100.07016.54
5.4.60.0030.07316.29
5.4.50.0100.07016.23
5.4.40.0100.06016.59
5.4.30.0070.07016.54
5.4.20.0030.07016.54
5.4.10.0030.07716.41
5.4.00.0100.07316.08
5.3.290.0070.06714.70
5.3.280.0100.07314.62
5.3.270.0070.07314.65
5.3.260.0000.08014.74
5.3.250.0000.08014.63
5.3.240.0070.07314.75
5.3.230.0070.06314.46
5.3.220.0100.07314.54
5.3.210.0030.07714.43
5.3.200.0070.06314.56
5.3.190.0000.08014.45
5.3.180.0070.07314.59
5.3.170.0100.07314.61
5.3.160.0070.07714.60
5.3.150.0030.07314.57
5.3.140.0130.06014.69
5.3.130.0100.07314.55
5.3.120.0000.08314.58
5.3.110.0070.07014.54
5.3.100.0000.07714.05
5.3.90.0100.06014.01
5.3.80.0130.06714.03
5.3.70.0070.06714.04
5.3.60.0000.05014.00
5.3.50.0070.07014.04
5.3.40.0070.07014.05
5.3.30.0030.07313.93
5.3.20.0070.06713.71
5.3.10.0070.07013.69
5.3.00.0130.02713.61
5.2.170.0100.03011.90
5.2.160.0000.06011.90
5.2.150.0030.06311.90
5.2.140.0030.06011.90
5.2.130.0030.05011.90
5.2.120.0000.03711.90
5.2.110.0070.06311.90
5.2.100.0070.06011.90
5.2.90.0030.04011.90
5.2.80.0130.02711.90
5.2.70.0000.06711.90
5.2.60.0030.04311.90
5.2.50.0030.06011.90
5.2.40.0100.04711.90
5.2.30.0030.05011.90
5.2.20.0030.03711.90
5.2.10.0070.05711.90
5.2.00.0100.05711.90
5.1.60.0030.03711.90
5.1.50.0100.04711.90
5.1.40.0070.04711.90
5.1.30.0100.05311.90
5.1.20.0070.05711.90
5.1.10.0070.04711.90
5.1.00.0030.05311.90
5.0.50.0000.04311.90
5.0.40.0070.03011.90
5.0.30.0000.06311.90
5.0.20.0000.04311.90
5.0.10.0030.04711.90
5.0.00.0000.06311.90
4.4.90.0030.03711.90
4.4.80.0070.03011.90
4.4.70.0100.03011.90
4.4.60.0000.03711.90
4.4.50.0030.02011.90
4.4.40.0000.04711.90
4.4.30.0000.02311.90
4.4.20.0030.03311.90
4.4.10.0030.03311.90
4.4.00.0070.03311.90
4.3.110.0000.03711.90
4.3.100.0030.03311.90
4.3.90.0000.03311.90
4.3.80.0000.05311.90
4.3.70.0000.03311.90
4.3.60.0030.03311.90
4.3.50.0030.03311.90
4.3.40.0030.05011.90
4.3.30.0030.03311.90
4.3.20.0070.03311.90
4.3.10.0000.03011.90
4.3.00.0000.03011.90

preferences:
39.4 ms | 401 KiB | 5 Q