3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public $a; public $b; public $c; public $d; } $inner1 = new TestClass; $inner1->a = 1000; $inner2 = new TestClass; $inner2->a = 1000; $inner3 = new TestClass; $inner3->a = 1001; $o1 = new TestClass; $o1->a = 'abc'; $o1->b = ['a', 'b', 'c']; $o1->c = 123456; $o1->d = $inner1; $o2 = new TestClass; $o2->a = 'abc'; $o2->b = ['a', 'b', 'c']; $o2->c = 123456; $o2->d = $inner2; $o3 = new TestClass; $o3->a = 'abc'; $o3->b = ['a', 'b', 'c']; $o3->c = 123456; $o3->d = $inner3; var_dump([ md5($o1), md5($o2), md5($o3), ]); var_dump($o1 == $o2); var_dump($o1 === $o2);

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.70.0130.00318.43
8.3.60.0120.00616.73
8.3.50.0130.01322.05
8.3.40.0040.01218.92
8.3.30.0110.01119.21
8.3.20.0000.00720.02
8.3.10.0040.00421.91
8.3.00.0050.00319.26
8.2.190.0080.01116.75
8.2.180.0140.00716.88
8.2.170.0110.00422.96
8.2.160.0110.00420.34
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0000.01021.00
8.2.100.0080.00417.63
8.2.90.0040.00419.28
8.2.80.0090.00017.97
8.2.70.0000.00917.63
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0040.00419.76
8.2.30.0030.00618.13
8.2.20.0020.00517.60
8.2.10.0030.00617.90
8.2.00.0040.00417.58
8.1.280.0140.00725.92
8.1.270.0080.00018.75
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.20
8.1.230.0080.00317.64
8.1.220.0030.00517.74
8.1.210.0020.01018.77
8.1.200.0070.00317.35
8.1.190.0040.00417.23
8.1.180.0050.00218.10
8.1.170.0040.00420.37
8.1.160.0020.00522.02
8.1.150.0040.00418.76
8.1.140.0040.00417.31
8.1.130.0030.00317.80
8.1.120.0080.00017.40
8.1.110.0030.00517.34
8.1.100.0020.00517.37
8.1.90.0050.00217.42
8.1.80.0070.00017.45
8.1.70.0000.00717.40
8.1.60.0050.00317.57
8.1.50.0000.00717.43
8.1.40.0000.00917.51
8.1.30.0050.00317.65
8.1.20.0080.00017.61
8.1.10.0050.00317.53
8.1.00.0040.00417.42
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.40
8.0.270.0030.00317.33
8.0.260.0040.00417.32
8.0.250.0000.00716.96
8.0.240.0000.00716.90
8.0.230.0030.00316.91
8.0.220.0030.00316.89
8.0.210.0030.00316.92
8.0.200.0000.00616.87
8.0.190.0070.00017.02
8.0.180.0040.00416.94
8.0.170.0000.00817.00
8.0.160.0000.00716.91
8.0.150.0070.00016.92
8.0.140.0040.00416.90
8.0.130.0040.00413.30
8.0.120.0050.00316.90
8.0.110.0040.00416.86
8.0.100.0000.00816.74
8.0.90.0070.00016.88
8.0.80.0080.00816.89
8.0.70.0040.00416.89
8.0.60.0050.00216.87
8.0.50.0000.00816.96
8.0.30.0130.00817.17
8.0.20.0110.00717.40
8.0.10.0070.00016.91
8.0.00.0100.01116.90
7.4.330.0050.00215.03
7.4.320.0060.00016.54
7.4.300.0000.00616.57
7.4.290.0030.00616.55
7.4.280.0040.00416.52
7.4.270.0040.00416.61
7.4.260.0000.01016.63
7.4.250.0000.00716.55
7.4.240.0030.00416.57
7.4.230.0030.00316.51
7.4.220.0120.01116.57
7.4.210.0070.01016.63
7.4.200.0030.00316.65
7.4.160.0120.00416.52
7.4.150.0120.00617.40
7.4.140.0090.01117.86
7.4.130.0140.00516.58
7.4.120.0150.00516.65
7.4.110.0120.00816.49
7.4.100.0120.00616.47
7.4.90.0090.00916.61
7.4.80.0030.01619.39
7.4.70.0130.00716.54
7.4.60.0110.00916.50
7.4.50.0040.00416.42
7.4.40.0030.01516.74
7.4.30.0090.01216.59
7.4.00.0040.01414.73
7.3.330.0030.00313.50
7.3.320.0050.01013.45
7.3.310.0050.00316.49
7.3.300.0030.00316.32
7.3.290.0030.00316.41
7.3.280.0090.01016.45
7.3.270.0110.00617.40
7.3.260.0120.00416.62
7.3.250.0090.00816.52
7.3.240.0060.01116.46
7.3.230.0160.00616.71
7.3.210.0110.01316.42
7.3.200.0070.01019.39
7.3.190.0070.01116.36
7.3.180.0060.01016.68
7.3.170.0150.00616.60
7.3.160.0120.00316.65
7.2.330.0120.01216.70
7.2.320.0150.00916.47
7.2.310.0090.00916.57
7.2.300.0100.00716.50
7.2.290.0130.01016.64
7.2.80.0040.00816.78
7.2.00.0040.01119.29
7.1.200.0030.00715.73
7.1.100.0040.00718.16
7.1.70.0150.00916.84
7.1.60.0070.01819.50
7.1.50.0190.01634.82
7.1.00.0100.07022.32
7.0.200.0190.00614.96
7.0.140.0000.07022.07
7.0.60.0030.06020.05
7.0.50.0130.07717.89
7.0.40.0030.07720.26
7.0.30.0300.04720.06
7.0.20.0200.06320.06
7.0.10.0130.05320.21
7.0.00.0030.07320.22
5.6.280.0170.06021.16
5.6.210.0100.08020.64
5.6.200.0070.08018.20
5.6.190.0070.07320.47
5.6.180.0300.08020.53
5.6.170.0100.04720.48
5.6.160.0100.07320.52
5.6.150.0130.03318.27
5.6.140.0000.04318.19
5.6.130.0030.04718.28
5.6.120.0030.08320.99
5.6.110.0030.09020.98
5.6.100.0100.08021.04
5.6.90.0070.06720.97
5.6.80.0170.07020.41
5.6.70.0130.04020.37
5.5.350.0230.07720.47
5.5.340.0000.05717.96
5.5.330.0100.03720.21
5.5.320.0100.07720.43
5.5.310.0170.05720.50
5.5.300.0070.08017.99
5.5.290.0070.08017.98
5.5.280.0200.05020.74
5.5.270.0100.08320.89
5.5.260.0170.07720.68
5.5.250.0130.05720.78
5.5.240.0070.08020.37
5.4.450.0530.06719.17
5.4.440.0170.07719.33
5.4.430.0900.06019.55
5.4.420.1530.07319.54
5.4.410.0070.06018.92
5.4.400.0800.05018.78
5.4.390.0900.07318.74
5.4.380.1000.06018.61
5.4.370.0900.07018.63
5.4.360.1070.06018.75
5.4.350.1070.07318.46
5.4.340.1130.06318.85
5.4.320.0900.07718.77
5.4.310.1000.07018.63
5.4.300.1000.07718.69
5.4.290.0800.07318.84
5.4.280.0830.05718.46
5.4.270.0830.07718.77
5.4.260.1530.05018.71
5.4.250.0800.06018.83
5.4.240.0800.07018.71
5.4.230.0930.07318.82
5.4.220.0700.04318.48
5.4.210.0700.06718.60
5.4.200.0500.05316.79
5.4.190.0700.07318.76
5.4.180.0800.05718.50
5.4.170.0830.06018.55
5.4.160.0700.05718.70
5.4.150.0800.05318.75
5.4.140.0730.05716.29
5.4.130.1000.04316.29
5.4.120.1000.05316.43
5.4.110.0830.06016.29
5.4.100.0800.06016.30
5.4.90.0870.07016.33
5.4.80.1100.04316.32
5.4.70.1000.06016.31
5.4.60.1070.05316.36
5.4.50.0900.04716.18
5.4.40.1130.04716.25
5.4.30.2670.05016.41
5.4.20.0900.06316.23
5.4.10.0970.05316.30
5.4.00.0870.04715.72
5.3.290.0930.06714.77
5.3.280.1530.05014.76
5.3.270.0770.07014.74
5.3.260.0900.06014.74
5.3.250.0870.05314.65
5.3.240.0970.04714.65
5.3.230.0730.06014.80
5.3.220.0730.05714.70
5.3.210.0670.06314.69
5.3.200.0800.06314.70
5.3.190.0700.07014.62
5.3.180.0930.05314.79
5.3.170.1430.06314.55
5.3.160.0800.06314.59
5.3.150.1170.04314.75
5.3.140.0800.06314.73
5.3.130.1000.07314.65
5.3.120.1200.06014.54
5.3.110.0870.06314.75
5.3.100.1030.06014.18
5.3.90.1070.06314.05
5.3.80.0800.05714.05
5.3.70.0700.05714.14
5.3.60.0900.05714.10
5.3.50.1030.04313.97
5.3.40.0770.06014.15
5.3.30.0770.04714.02
5.3.20.0800.04313.79
5.3.10.0870.05313.75
5.3.00.0770.05713.66
5.2.170.0730.04311.25
5.2.160.0900.03011.20
5.2.150.0730.04711.37
5.2.140.0800.04711.13
5.2.130.0730.04011.32
5.2.120.0600.04311.12
5.2.110.0570.04311.12
5.2.100.0930.03711.20
5.2.90.0700.04311.13
5.2.80.0630.05311.14
5.2.70.0600.05011.11
5.2.60.0700.05711.15
5.2.50.0830.06011.13
5.2.40.0630.05311.05
5.2.30.0500.04711.10
5.2.20.0600.04710.95
5.2.10.0630.05710.93
5.2.00.0530.04710.82
5.1.60.0500.03010.11
5.1.50.0600.04010.02
5.1.40.0700.04710.02
5.1.30.0470.05710.43
5.1.20.0670.05710.54
5.1.10.0730.04010.09
5.1.00.0470.04310.25
5.0.50.0270.0308.54
5.0.40.0100.0238.39
5.0.30.0270.0538.41
5.0.20.0270.0308.23
5.0.10.0330.0278.24
5.0.00.0330.0508.23
4.4.90.0200.0276.02
4.4.80.0300.0275.88
4.4.70.0230.0235.89
4.4.60.0300.0275.91
4.4.50.0230.0305.88
4.4.40.0200.0435.88
4.4.30.0230.0235.91
4.4.20.0300.0275.92
4.4.10.0170.0235.94
4.4.00.0400.0306.02
4.3.110.0200.0235.95
4.3.100.0300.0235.81
4.3.90.0200.0205.80
4.3.80.0200.0335.84
4.3.70.0200.0305.89
4.3.60.0400.0175.91
4.3.50.0200.0275.79
4.3.40.0230.0405.83
4.3.30.0170.0274.59
4.3.20.0130.0274.55
4.3.10.0200.0234.49
4.3.00.0130.0206.70

preferences:
45.04 ms | 401 KiB | 5 Q