3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $i = 0; public function __toString() { $this->i++; return "$this->i"; } } $a = new A; $b = [100, $a]; $c = [100, (string) $a]; $d = [100, $a]; var_dump( array_intersect($b, $b), array_intersect($c, $c), array_intersect($d, $d) );

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.0070.00718.56
8.3.50.0110.00821.14
8.3.40.0070.01118.90
8.3.30.0110.00420.16
8.3.20.0050.00318.64
8.3.10.0050.00321.09
8.3.00.0050.00322.34
8.2.180.0110.00416.63
8.2.170.0040.01122.96
8.2.160.0100.00320.35
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0030.00620.95
8.2.110.0090.00020.55
8.2.100.0040.00717.91
8.2.90.0000.00819.14
8.2.80.0030.00618.04
8.2.70.0040.00417.49
8.2.60.0050.00318.04
8.2.50.0000.01118.07
8.2.40.0040.00418.28
8.2.30.0030.00521.28
8.2.20.0040.00417.71
8.2.10.0040.00417.61
8.2.00.0050.00317.79
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.42
8.1.230.0080.00820.62
8.1.220.0080.00018.77
8.1.210.0030.00618.97
8.1.200.0060.00317.38
8.1.190.0040.00417.54
8.1.180.0060.00318.10
8.1.170.0080.00018.64
8.1.160.0050.00218.98
8.1.150.0040.00418.64
8.1.140.0050.00317.45
8.1.130.0050.00217.41
8.1.120.0040.00417.36
8.1.110.0040.00417.38
8.1.100.0040.00417.48
8.1.90.0040.00417.47
8.1.80.0040.00317.45
8.1.70.0030.00317.32
8.1.60.0030.00617.57
8.1.50.0020.00517.43
8.1.40.0060.00317.44
8.1.30.0000.00717.64
8.1.20.0040.00417.57
8.1.10.0080.00017.58
8.1.00.0040.00417.50
8.0.300.0040.00420.04
8.0.290.0060.00317.05
8.0.280.0000.00718.48
8.0.270.0000.00717.35
8.0.260.0030.00316.73
8.0.250.0030.00316.84
8.0.240.0040.00416.92
8.0.230.0080.00016.80
8.0.220.0030.00316.93
8.0.210.0000.00716.90
8.0.200.0090.00016.84
8.0.190.0000.00716.98
8.0.180.0030.00316.96
8.0.170.0030.00616.89
8.0.160.0000.00716.97
8.0.150.0040.00416.86
8.0.140.0080.00316.73
8.0.130.0000.00613.35
8.0.120.0000.00816.87
8.0.110.0050.00316.95
8.0.100.0040.00416.96
8.0.90.0040.00416.78
8.0.80.0090.01216.93
8.0.70.0000.00716.93
8.0.60.0040.00416.99
8.0.50.0040.00416.75
8.0.30.0110.00817.14
8.0.20.0090.00917.40
8.0.10.0040.00417.07
8.0.00.0100.00916.78
7.4.330.0050.00016.77
7.4.320.0030.00316.50
7.4.300.0050.00216.46
7.4.290.0000.00716.60
7.4.280.0070.00016.50
7.4.270.0030.00316.49
7.4.260.0030.00313.19
7.4.250.0040.00416.56
7.4.240.0070.00016.40
7.4.230.0070.00016.66
7.4.220.0090.00916.58
7.4.210.0090.00616.50
7.4.200.0000.00716.60
7.4.190.0040.00416.75
7.4.160.0120.00316.39
7.4.150.0100.01617.40
7.4.140.0120.00617.86
7.4.130.0130.00316.49
7.4.120.0060.01216.41
7.4.110.0120.00616.49
7.4.100.0090.00916.44
7.4.90.0150.00316.54
7.4.80.0110.00819.39
7.4.70.0140.00316.25
7.4.60.0030.01616.27
7.4.50.0000.00516.45
7.4.40.0090.00322.77
7.4.30.0110.00616.39
7.4.00.0040.01215.13
7.3.330.0050.00013.21
7.3.320.0020.00313.16
7.3.310.0000.00716.27
7.3.300.0030.00316.16
7.3.290.0060.00716.25
7.3.280.0090.01116.33
7.3.270.0120.00517.40
7.3.260.0120.00618.24
7.3.250.0110.00916.42
7.3.240.0130.00316.31
7.3.230.0070.01116.39
7.3.210.0070.01016.36
7.3.200.0100.01419.39
7.3.190.0090.01316.35
7.3.180.0150.00616.37
7.3.170.0100.00716.50
7.3.160.0060.01016.20
7.3.120.0070.01015.05
7.2.330.0110.00716.46
7.2.320.0060.01116.59
7.2.310.0110.00516.71
7.2.300.0030.01316.88
7.2.290.0070.01316.68
7.2.60.0090.00617.08
7.2.00.0030.01019.39
7.1.200.0060.00615.91
7.1.100.0050.00318.14
7.1.70.0080.00417.02
7.1.60.0000.02419.17
7.1.50.0090.01616.89
7.1.00.0070.06022.28
7.0.200.0030.00316.82
7.0.140.0030.07321.99
7.0.60.0030.05019.92
7.0.50.0030.07317.91
7.0.40.0070.05720.27
7.0.30.0400.06020.20
7.0.20.0230.06720.15
7.0.10.0070.07020.23
7.0.00.0100.05320.07
5.6.280.0000.07720.78
5.6.210.0000.04320.55
5.6.200.0170.06718.27
5.6.190.0000.09320.34
5.6.180.0530.05020.46
5.6.170.0230.08320.62
5.6.160.0000.08720.59
5.6.150.0100.07718.27
5.6.140.0030.05318.17
5.6.130.0070.06318.18
5.6.120.0030.08021.00
5.6.110.0100.08020.96
5.6.100.0070.06320.96
5.6.90.0070.07720.96
5.6.80.0070.08020.44
5.5.350.0230.07720.36
5.5.340.0000.05017.99
5.5.330.0100.05020.29
5.5.320.0030.08320.28
5.5.310.0300.07020.33
5.5.300.0070.07017.98
5.5.290.0100.07717.95
5.5.280.0070.06020.88
5.5.270.0100.07320.67
5.5.260.0130.07720.96
5.5.250.0030.06020.58
5.5.240.0070.07720.24
5.4.450.0200.05019.50
5.4.440.0270.06019.52
5.4.430.0270.07019.48
5.4.420.0300.07019.40
5.4.410.0170.05719.36
5.4.400.0170.04018.95
5.4.390.0130.06718.95
5.4.380.0130.04319.31
5.4.370.0170.03719.31
5.4.360.0170.05019.09
5.4.350.0170.03719.25
5.4.340.0170.04019.16
5.4.320.0230.04719.20
5.4.310.0100.04019.09
5.4.300.0170.03718.99
5.4.290.0130.04019.16
5.4.280.0130.04019.13
5.4.270.0370.05318.95
5.4.260.0200.04719.24
5.4.250.0200.03319.19
5.4.240.0130.03719.30
5.4.230.0230.03019.23
5.4.220.0170.03719.31
5.4.210.0200.03019.21
5.4.200.0170.03719.05
5.4.190.0200.03019.23
5.4.180.0100.05019.18
5.4.170.0200.03019.05
5.4.160.0230.04319.05
5.4.150.0070.04019.17
5.4.140.0200.03316.68
5.4.130.0130.03716.67
5.4.120.0130.04016.39
5.4.110.0130.04016.26
5.4.100.0170.03716.46
5.4.90.0230.04016.40
5.4.80.0130.04016.36
5.4.70.0230.03016.40
5.4.60.0200.05016.53
5.4.50.0130.04016.51
5.4.40.0130.04016.43
5.4.30.0130.04016.38
5.4.20.0170.04016.22
5.4.10.0200.03316.52
5.4.00.0200.03315.80
5.3.290.0200.03314.57
5.3.280.0130.04014.64
5.3.270.0170.04014.82
5.3.260.0170.03714.62
5.3.250.0330.03014.57
5.3.240.0070.03314.59
5.3.230.0070.03714.68
5.3.220.0230.03014.71
5.3.210.0230.03014.54
5.3.200.0100.04314.46
5.3.190.0170.03714.54
5.3.180.0200.04314.56
5.3.170.0200.03314.54
5.3.160.0170.04714.55
5.3.150.0100.04314.46
5.3.140.0030.04714.53
5.3.130.0000.04314.55
5.3.120.0230.03314.48
5.3.110.0200.03314.52
5.3.100.0030.04014.26
5.3.90.0230.04314.04
5.3.80.0130.03713.94
5.3.70.0130.03314.07
5.3.60.0170.03714.02
5.3.50.0300.03313.86
5.3.40.0100.03713.86
5.3.30.0170.03313.93
5.3.20.0170.03313.70
5.3.10.0130.03713.88
5.3.00.0230.04013.61
5.2.170.0070.03311.15
5.2.160.0030.03711.37
5.2.150.0200.03711.23
5.2.140.0070.03311.05
5.2.130.0100.03311.11
5.2.120.0130.02711.08
5.2.110.0130.03711.00
5.2.100.0170.03311.07
5.2.90.0130.02711.02
5.2.80.0170.02711.02
5.2.70.0100.03311.01
5.2.60.0270.02311.13
5.2.50.0200.02011.09
5.2.40.0100.03010.92
5.2.30.0170.03010.90
5.2.20.0170.02311.04
5.2.10.0130.02310.78
5.2.00.0130.02710.73
5.1.60.0130.02010.07
5.1.50.0130.0209.97
5.1.40.0100.0379.97
5.1.30.0100.04310.29
5.1.20.0100.03010.27
5.1.10.0100.0279.97
5.1.00.0100.02710.05
5.0.50.0100.0208.43
5.0.40.0070.0478.35
5.0.30.0070.0308.23
5.0.20.0030.0208.28
5.0.10.0070.0478.16
5.0.00.0030.0678.05
4.4.90.0070.0337.77
4.4.80.0030.0337.77
4.4.70.0070.0237.77
4.4.60.0070.0237.77
4.4.50.0030.0237.77
4.4.40.0130.0377.77
4.4.30.0070.0177.77
4.4.20.0030.0177.77
4.4.10.0100.0177.77
4.4.00.0130.0507.77
4.3.110.0030.0177.77
4.3.100.0130.0207.77
4.3.90.0070.0237.77
4.3.80.0100.0507.77
4.3.70.0070.0237.77
4.3.60.0100.0207.77
4.3.50.0030.0237.77
4.3.40.0100.0237.77
4.3.30.0030.0177.77
4.3.20.0030.0177.77
4.3.10.0000.0207.77
4.3.00.0030.0137.77

preferences:
69.55 ms | 404 KiB | 6 Q