3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(-1); ini_set('display_errors', 'On'); class Foo { public $id; public function __construct($id) { $this->id = $id; } } $foos = [new Foo(1), new Foo(2), new Foo(3), new Foo(4)]; $fooIds = [1, 2, 3, 4]; $diff = array_udiff($foos, $fooIds, function ($a, $b) { echo gettype($a), ' <=> ', gettype($b), "\n"; if ($a instanceof Foo && $b instanceof Foo) { return $a->id <=> $b->id; } if ($a instanceof Foo) { return $a->id <=> $b; } if ($b instanceof Foo) { return $a <=> $b->id; } return $a <=> $b; }); print_r($diff); // expected result: an empty array

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.5.10.0140.00416.64
8.5.00.0100.01019.87
8.4.150.0010.00114.05
8.4.140.0170.00417.65
8.4.130.0090.00718.64
8.4.120.0070.01224.16
8.4.110.0150.00622.42
8.4.100.0150.00617.68
8.4.90.0150.00619.52
8.4.80.0130.00718.00
8.4.70.0110.01017.71
8.4.60.0140.00617.93
8.4.50.0110.00918.65
8.4.40.0100.01019.33
8.4.30.0180.00320.62
8.4.20.0160.00318.91
8.4.10.0040.01519.42
8.3.280.0110.00820.72
8.3.270.0180.00916.71
8.3.260.0140.00616.70
8.3.250.0070.00118.85
8.3.240.0130.00617.21
8.3.230.0090.00916.64
8.3.220.0140.00617.43
8.3.210.0060.00616.86
8.3.200.0130.00616.55
8.3.190.0100.00516.38
8.3.180.0030.00620.49
8.3.170.0070.01120.66
8.3.160.0130.00618.41
8.3.150.0150.00316.48
8.3.140.0040.00716.55
8.3.130.0000.00818.31
8.3.120.0030.01720.68
8.3.110.0050.00516.75
8.3.100.0030.00520.46
8.3.90.0050.00326.77
8.3.80.0060.00316.50
8.3.70.0100.01016.73
8.3.60.0090.00618.31
8.3.50.0070.00917.49
8.3.40.0060.00918.83
8.3.30.0120.00318.83
8.3.20.0060.00321.73
8.3.10.0040.00420.94
8.3.00.0060.00321.86
8.2.290.0070.01220.82
8.2.280.0050.00320.09
8.2.270.0150.00422.47
8.2.260.0150.00616.53
8.2.250.0100.00716.54
8.2.240.0110.00017.23
8.2.230.0140.00722.58
8.2.220.0040.00724.06
8.2.210.0000.00826.77
8.2.200.0040.00817.00
8.2.190.0140.00318.29
8.2.180.0070.00725.92
8.2.170.0120.00322.96
8.2.160.0140.00022.25
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00420.93
8.2.110.0030.00722.25
8.2.100.0060.00617.72
8.2.90.0060.00322.38
8.2.80.0080.00017.97
8.2.70.0000.00817.80
8.2.60.0040.00418.03
8.2.50.0000.00919.28
8.2.40.0040.00419.29
8.2.30.0080.00020.43
8.2.20.0000.00718.09
8.2.10.0000.00818.95
8.2.00.0040.00418.09
8.1.330.0090.01016.82
8.1.320.0160.00716.11
8.1.310.0110.00418.42
8.1.300.0050.00316.43
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0000.00824.66
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0070.00420.69
8.1.230.0070.00420.85
8.1.220.0000.00817.74
8.1.210.0000.00918.94
8.1.200.0040.00417.48
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0050.00318.66
8.1.160.0050.00218.83
8.1.150.0040.00418.91
8.1.140.0000.00720.34
8.1.130.0000.00717.38
8.1.120.0040.00417.34
8.1.110.0030.00517.35
8.1.100.0030.00717.47
8.1.90.0040.00417.38
8.1.80.0050.00517.54
8.1.70.0040.00717.37
8.1.60.0040.00417.50
8.1.50.0040.00417.44
8.1.40.0060.00317.56
8.1.30.0000.00917.63
8.1.20.0040.00417.64
8.1.10.0040.00417.65
8.1.00.0040.00417.40
8.0.300.0070.00020.04
8.0.290.0080.00016.75
8.0.280.0040.00418.39
8.0.270.0070.00017.31
8.0.260.0030.00616.72
8.0.250.0040.00416.88
8.0.240.0000.00816.93
8.0.230.0030.00316.98
8.0.220.0000.00816.93
8.0.210.0030.00416.90
8.0.200.0000.00716.97
8.0.190.0080.00016.88
8.0.180.0070.00016.91
8.0.170.0040.00416.92
8.0.160.0040.00416.88
8.0.150.0000.00716.80
8.0.140.0070.00016.88
8.0.130.0060.00313.36
8.0.120.0000.00716.78
8.0.110.0000.00816.83
8.0.100.0040.00416.95
8.0.90.0000.00716.70
8.0.80.0100.00716.88
8.0.70.0040.00416.80
8.0.60.0060.00316.75
8.0.50.0000.00716.85
8.0.30.0110.01117.12
8.0.20.0070.01917.08
8.0.10.0000.00816.85
8.0.00.0130.00716.70
7.4.330.0040.00015.55
7.4.320.0000.00616.61
7.4.300.0000.00616.63
7.4.290.0000.00716.50
7.4.280.0030.00516.38
7.4.270.0000.00816.61
7.4.260.0040.00416.50
7.4.250.0070.00016.51
7.4.240.0030.00616.63
7.4.230.0000.00716.49
7.4.220.0050.00316.61
7.4.210.0080.00816.62
7.4.200.0050.00316.71
7.4.160.0090.01316.60
7.4.140.0100.01017.86
7.4.130.0100.00716.56
7.4.120.0060.01116.68
7.4.110.0070.01116.68
7.4.100.0060.01916.46
7.4.90.0180.00616.72
7.4.80.0040.01319.39
7.4.70.0090.01216.65
7.4.60.0120.00916.51
7.4.50.0150.00416.41
7.4.40.0070.01016.61
7.4.10.0070.01014.97
7.4.00.0100.00315.05
7.3.330.0000.00513.38
7.3.320.0030.00313.45
7.3.310.0000.00716.23
7.3.300.0020.00516.32
7.3.290.0080.00816.35
7.3.280.0080.00916.38
7.3.260.0110.01016.40
7.3.240.0080.01016.57
7.3.230.0030.01316.37
7.3.210.0140.00316.66
7.3.200.0130.01016.32
7.3.190.0130.01016.50
7.3.180.0060.01316.46
7.3.170.0100.00616.61
7.3.160.0120.00616.53
7.3.130.0090.00615.05
7.3.120.0130.00615.00
7.3.110.0060.01314.57
7.3.100.0100.00714.81
7.3.90.0130.00314.56
7.3.80.0080.00314.80
7.3.70.0120.00314.83
7.3.60.0100.00314.50
7.3.50.0080.01014.77
7.3.40.0050.00614.69
7.3.30.0030.01014.61
7.3.20.0070.01016.60
7.3.10.0030.01016.66
7.3.00.0070.01016.63
7.2.330.0110.00716.75
7.2.320.0110.00616.79
7.2.310.0120.01216.73
7.2.300.0070.01416.70
7.2.290.0100.00716.79
7.2.260.0060.01315.11
7.2.250.0040.01115.10
7.2.240.0070.00714.61
7.2.230.0070.00314.94
7.2.220.0040.01215.16
7.2.210.0080.00815.05
7.2.200.0040.00815.16
7.2.190.0100.00315.06
7.2.180.0080.00715.12
7.2.170.0070.00614.97
7.2.160.0050.00614.95
7.2.150.0100.00717.04
7.2.140.0090.01016.95
7.2.130.0030.01316.97
7.2.120.0090.00616.87
7.2.110.0130.00316.70
7.2.100.0050.00816.96
7.2.90.0020.01217.00
7.2.80.0080.00617.01
7.2.70.0120.00516.92
7.2.60.0080.00616.95
7.2.50.0050.00916.90
7.2.40.0080.01017.07
7.2.30.0080.01016.99
7.2.20.0110.00417.02
7.2.10.0080.00616.90
7.2.00.0060.01016.88
7.1.330.0000.01315.47
7.1.320.0090.00615.71
7.1.310.0060.00615.95
7.1.300.0100.00315.66
7.1.290.0060.00315.66
7.1.280.0110.00315.79
7.1.270.0050.01215.82
7.1.260.0080.00515.87
7.1.250.0040.00815.80
7.1.240.0000.01316.03
7.1.230.0040.01215.58
7.1.220.0040.00415.91
7.1.210.0060.00515.87
7.1.200.0130.00315.95
7.1.190.0030.00616.00
7.1.180.0060.00615.90
7.1.170.0100.00315.64
7.1.160.0000.01015.79
7.1.150.0030.01015.97
7.1.140.0060.00615.93
7.1.130.0070.00715.98
7.1.120.0030.01015.75
7.1.110.0040.00415.80
7.1.100.0030.00615.89
7.1.90.0060.00615.97
7.1.80.0110.00315.71
7.1.70.0100.00315.89
7.1.60.0100.00715.95
7.1.50.0070.00715.79
7.1.40.0030.01015.80
7.1.30.0070.01115.79
7.1.20.0030.00615.89
7.1.10.0090.00915.51
7.1.00.0030.00915.64

preferences:
174.32 ms | 403 KiB | 5 Q