3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NameObj { public $name; function __construct($name){ $this->name = $name; } } class IdObj{ public $id; function __construct($id){ $this->id = $id; } } $idArray = array( new IdObj(1), new IdObj(2), new IdObj(3) ); $nameArray = array( new NameObj('1 - Object 1 Name'), new NameObj('2 - Object 2 Name') ); function custom_diff($oId, $oName) { $one = $oId instanceof IdObj?$oId->id:explode(' - ', $oId->name)[0]; $two = $oName instanceof NameObj?explode(' - ', $oName->name)[0]:$oName->id; return $one-$two; } $missing_objects = array_udiff($idArray, $nameArray, 'custom_diff'); print_r($missing_objects);

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.0120.00618.30
8.3.50.0040.01221.91
8.3.40.0040.01118.93
8.3.30.0070.00719.21
8.3.20.0080.00020.04
8.3.10.0000.00821.97
8.3.00.0080.00022.53
8.2.180.0070.01116.50
8.2.170.0120.00322.96
8.2.160.0080.00620.39
8.2.150.0040.00424.18
8.2.140.0130.00724.66
8.2.130.0050.00326.16
8.2.120.0000.00817.63
8.2.110.0000.00822.30
8.2.100.0120.00317.84
8.2.90.0060.00619.11
8.2.80.0040.00418.05
8.2.70.0030.00617.38
8.2.60.0060.00617.68
8.2.50.0000.00818.07
8.2.40.0000.01018.16
8.2.30.0040.00418.23
8.2.20.0050.00217.79
8.2.10.0070.00017.88
8.2.00.0000.00717.84
8.1.280.0140.00425.92
8.1.270.0060.01321.97
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0040.00424.03
8.1.230.0070.00419.22
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0060.00317.41
8.1.180.0050.00318.10
8.1.170.0080.00018.61
8.1.160.0040.00422.04
8.1.150.0050.00318.57
8.1.140.0000.00717.42
8.1.130.0040.00417.96
8.1.120.0030.00517.57
8.1.110.0020.00517.48
8.1.100.0000.00717.49
8.1.90.0040.00417.47
8.1.80.0000.00717.50
8.1.70.0030.00317.36
8.1.60.0040.00417.53
8.1.50.0070.00017.54
8.1.40.0050.00217.47
8.1.30.0000.00817.56
8.1.20.0000.00917.57
8.1.10.0040.00417.52
8.1.00.0000.00717.50
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0030.00318.54
8.0.270.0000.00717.20
8.0.260.0000.00616.83
8.0.250.0070.00016.98
8.0.240.0030.00417.03
8.0.230.0000.00717.04
8.0.220.0000.00716.89
8.0.210.0080.00016.89
8.0.200.0040.00416.91
8.0.190.0020.00517.02
8.0.180.0000.00716.95
8.0.170.0050.00317.03
8.0.160.0050.00216.94
8.0.150.0050.00316.84
8.0.140.0000.00716.93
8.0.130.0030.00313.40
8.0.120.0000.00817.00
8.0.110.0040.00416.96
8.0.100.0030.00516.88
8.0.90.0040.00416.81
8.0.80.0060.00916.86
8.0.70.0000.00717.05
8.0.60.0040.00416.99
8.0.50.0000.00716.90
8.0.30.0110.01117.19
8.0.20.0140.01017.40
8.0.10.0040.00417.10
8.0.00.0110.00916.92
7.4.330.0000.00615.14
7.4.320.0030.00316.46
7.4.300.0000.00616.62
7.4.290.0030.00316.58
7.4.280.0030.00316.61
7.4.270.0030.00316.59
7.4.260.0040.00416.47
7.4.250.0040.00416.55
7.4.240.0040.00416.65
7.4.230.0030.00516.44
7.4.220.0120.00616.73
7.4.210.0090.00716.62
7.4.200.0050.00216.63
7.4.190.0050.00316.67
7.4.160.0060.00916.54
7.4.150.0040.01417.40
7.4.140.0110.01017.86
7.4.130.0090.00916.55
7.4.120.0090.00916.47
7.4.110.0160.00616.71
7.4.100.0130.00916.68
7.4.90.0070.01016.56
7.4.80.0100.01019.39
7.4.70.0060.01216.57
7.4.60.0080.00816.62
7.4.50.0000.00816.54
7.4.40.0040.00722.77
7.4.30.0070.01416.34
7.4.00.0060.00814.75
7.3.330.0000.00513.37
7.3.320.0000.00613.36
7.3.310.0070.00016.40
7.3.300.0040.00416.24
7.3.290.0110.00316.36
7.3.280.0110.00616.39
7.3.270.0180.00717.40
7.3.260.0130.00516.43
7.3.250.0130.00716.56
7.3.240.0140.00316.68
7.3.230.0060.01316.39
7.3.210.0070.01016.50
7.3.200.0150.00619.39
7.3.190.0090.01516.36
7.3.180.0060.01016.49
7.3.170.0060.00916.49
7.3.160.0090.00616.65
7.3.120.0110.00714.93
7.3.110.0070.01015.02
7.3.100.0000.01415.06
7.3.90.0030.00614.65
7.3.80.0070.00714.93
7.3.70.0090.00614.96
7.3.60.0030.01514.71
7.3.50.0060.00914.92
7.3.40.0060.00615.01
7.3.30.0030.00814.81
7.3.20.0070.00716.71
7.3.10.0060.00616.85
7.3.00.0070.00316.77
7.2.330.0050.01516.76
7.2.320.0160.00916.65
7.2.310.0070.01116.68
7.2.300.0140.00316.79
7.2.290.0050.01016.81
7.2.250.0040.01814.84
7.2.240.0040.01215.08
7.2.230.0080.00815.25
7.2.220.0060.00615.18
7.2.210.0040.01115.22
7.2.200.0060.01215.11
7.2.190.0090.00614.88
7.2.180.0070.01014.95
7.2.170.0060.00915.14
7.2.60.0120.00316.55
7.2.50.0030.01016.99
7.1.330.0030.01215.74
7.1.320.0080.00815.69
7.1.310.0030.00915.57
7.1.300.0080.00415.39
7.1.290.0030.01015.82
7.1.280.0030.00615.89
7.1.270.0040.00815.87
7.1.260.0070.00715.81
7.1.200.0070.00415.95
7.1.70.0030.00316.93
7.1.60.0000.02519.82
7.1.50.0030.01916.97
7.1.00.0100.06722.31
7.0.200.0040.00416.39
7.0.140.0070.07022.07
7.0.110.0130.08320.02
7.0.100.0070.08319.84
7.0.90.0300.07019.89
7.0.80.0070.07319.96
7.0.70.0100.07719.85
7.0.60.0170.07720.01
7.0.50.0170.07020.26
7.0.40.0030.08720.16
7.0.30.0130.07320.21
7.0.20.0130.07320.13
7.0.10.0130.07320.18
7.0.00.0100.08320.04
5.6.250.0130.07320.59
5.6.240.0030.08320.65
5.6.230.0200.07020.51
5.6.220.0030.08720.49
5.6.210.0100.07720.59
5.6.200.0070.05021.12
5.6.190.0030.08020.93
5.6.180.0130.07321.27
5.6.170.0030.08721.23
5.6.160.0100.03721.09
5.6.150.0070.08020.99
5.6.140.0030.06321.14
5.6.130.0030.08020.93
5.6.120.0130.08321.26
5.6.110.0030.05721.29
5.6.100.0100.05720.96
5.6.90.0070.08321.08
5.6.80.0130.07020.45
5.6.70.0070.07720.53
5.6.60.0130.07020.44
5.6.50.0030.08020.58
5.6.40.0130.06020.51
5.6.30.0100.07720.42
5.6.20.0070.08320.39
5.6.10.0270.06020.29
5.6.00.0030.05020.31
5.5.380.0100.07320.33
5.5.370.0170.07320.52
5.5.360.0130.05720.49
5.5.350.0100.04720.35
5.5.340.0030.07320.85
5.5.330.0130.08020.74
5.5.320.0130.07720.96
5.5.310.0030.07720.96
5.5.300.0130.07020.90
5.5.290.0070.07320.80
5.5.280.0070.08020.88
5.5.270.0100.05720.70
5.5.260.0070.04320.81
5.5.250.0030.08020.71
5.5.240.0230.06320.41
5.5.230.0130.05320.12
5.5.220.0070.04720.41
5.5.210.0100.07720.31
5.5.200.0100.08020.33
5.5.190.0100.07020.23
5.5.180.0070.07720.36
5.5.160.0070.07320.24
5.5.150.0070.05020.24
5.5.140.0170.06720.10
5.5.130.0200.07020.03
5.5.120.0030.04720.24
5.5.110.0230.06320.16
5.5.100.0170.04020.29
5.5.90.0100.07019.96
5.5.80.0070.05320.11
5.5.70.0030.05320.25
5.5.60.0030.04320.14
5.5.50.0130.03720.07
5.5.40.0030.04720.21
5.5.30.0100.04720.02
5.5.20.0030.07020.07
5.5.10.0030.04020.12
5.5.00.0070.03720.08
5.4.450.0100.07719.47
5.4.440.0030.08019.27
5.4.430.0070.07319.36
5.4.420.0030.07719.33
5.4.410.0070.05319.38
5.4.400.0070.08019.00
5.4.390.0130.06719.01
5.4.380.0070.04318.99
5.4.370.0100.07019.03
5.4.360.0130.07019.09
5.4.350.0170.06019.02
5.4.340.0070.07319.14
5.4.320.0070.04719.04
5.4.310.0070.07319.00
5.4.300.0100.06319.10
5.4.290.0200.06019.08
5.4.280.0130.04319.33
5.4.270.0070.05319.22
5.4.260.0070.07318.99
5.4.250.0170.06319.04
5.4.240.0130.06719.03
5.4.230.0170.03318.97
5.4.220.0030.04019.08
5.4.210.0070.03719.01
5.4.200.0030.03719.16
5.4.190.0030.04019.13
5.4.180.0030.05319.13
5.4.170.0000.04018.98
5.4.160.0000.04018.88
5.4.150.0070.03719.14
5.4.140.0100.03016.32
5.4.130.0130.04316.38
5.4.120.0070.03316.56
5.4.110.0070.07016.64
5.4.100.0070.03316.48
5.4.90.0030.07016.55
5.4.80.0100.05716.59
5.4.70.0000.05016.54
5.4.60.0070.05316.48
5.4.50.0030.05016.39
5.4.40.0070.04316.62
5.4.30.0000.04716.51
5.4.20.0000.03716.38
5.4.10.0070.06316.41
5.4.00.0030.03315.78
5.3.290.0030.05314.68
5.3.280.0100.03014.63
5.3.270.0070.06014.66
5.3.260.0070.06314.64
5.3.250.0070.03314.75
5.3.240.0030.04014.48
5.3.230.0030.06314.84
5.3.220.0030.05314.58
5.3.210.0070.04014.71
5.3.200.0100.07014.56
5.3.190.0000.04014.45
5.3.180.0070.06714.54
5.3.170.0170.06314.70
5.3.160.0030.04014.66
5.3.150.0070.03314.57
5.3.140.0070.03714.70
5.3.130.0100.03014.71
5.3.120.0000.06014.70
5.3.110.0000.04314.59
5.3.100.0000.03714.18
5.3.90.0070.03713.99
5.3.80.0030.05314.10
5.3.70.0030.04014.02
5.3.60.0030.04313.87
5.3.50.0070.03313.98
5.3.40.0100.03013.97
5.3.30.0100.06313.95
5.3.20.0000.03713.79
5.3.10.0030.03713.71
5.3.00.0000.04013.79
5.2.170.0030.02711.01
5.2.160.0070.02311.28
5.2.150.0030.03011.01
5.2.140.0000.04011.38
5.2.130.0000.03011.14
5.2.120.0000.03311.19
5.2.110.0000.03011.12
5.2.100.0000.03011.13
5.2.90.0000.03011.07
5.2.80.0030.02711.12
5.2.70.0030.02711.11
5.2.60.0000.03011.06
5.2.50.0070.04311.15
5.2.40.0030.04311.01
5.2.30.0000.03310.95
5.2.20.0030.02710.99
5.2.10.0070.02310.83
5.2.00.0030.02710.72
5.1.60.0000.03010.27
5.1.50.0030.02710.27
5.1.40.0070.05010.27
5.1.30.0030.02310.48
5.1.20.0030.03010.32
5.1.10.0000.02710.33
5.1.00.0000.02710.27
5.0.50.0030.02010.27
5.0.40.0000.02010.27
5.0.30.0030.03010.27
5.0.20.0030.01710.27
5.0.10.0030.02310.27
5.0.00.0000.05310.27
4.4.90.0030.01310.27
4.4.80.0000.01710.27
4.4.70.0070.02710.27
4.4.60.0000.01310.27
4.4.50.0030.01310.27
4.4.40.0000.02710.27
4.4.30.0030.01710.27
4.4.20.0000.01710.27
4.4.10.0000.01310.27
4.4.00.0000.02710.27
4.3.110.0000.01710.27
4.3.100.0000.01310.27
4.3.90.0000.01710.27
4.3.80.0000.04710.27
4.3.70.0030.02710.27
4.3.60.0100.02710.27
4.3.50.0000.03310.27
4.3.40.0030.04310.27
4.3.30.0030.02310.27
4.3.20.0030.03310.27
4.3.10.0000.02710.27
4.3.00.0000.03010.27

preferences:
41.56 ms | 401 KiB | 5 Q