3v4l.org

run code in 300+ PHP versions simultaneously
<?php class b { protected $object; public function __construct() { $this->object = new \stdClass(); $this->object->name = "default"; } public function setObject(\stdClass $object) { $this->object = $object; } public function getObject() { return $this->object; } public function __clone() { $this->object = clone $this->object; } } class runner { public function run() { $object1 = new stdClass(); $object1->name = "object1"; $object2 = new stdClass(); $object2->name = "object2"; $b1 = new b(); if ($object1 instanceof $b1->object) { $b2 = clone $b1; $b2->object = $object1; echo $b2->getObject()->name; } } } $runner = new runner(); $runner->run();

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.0110.00418.43
8.3.50.0140.00922.11
8.3.40.0120.00618.83
8.3.30.0070.01019.04
8.3.20.0000.00820.16
8.3.10.0080.00021.84
8.3.00.0050.00322.39
8.2.180.0100.01016.75
8.2.170.0080.00822.96
8.2.160.0070.00720.38
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0000.01526.16
8.2.120.0050.00319.36
8.2.110.0000.00922.20
8.2.100.0120.00019.51
8.2.90.0060.00319.22
8.2.80.0040.00418.04
8.2.70.0050.00517.63
8.2.60.0060.00318.04
8.2.50.0060.00618.07
8.2.40.0050.00318.09
8.2.30.0000.00717.93
8.2.20.0050.00317.67
8.2.10.0040.00419.45
8.2.00.0080.00017.57
8.1.280.0090.00625.92
8.1.270.0060.00323.99
8.1.260.0030.00526.35
8.1.250.0050.00228.09
8.1.240.0050.00323.99
8.1.230.0040.00819.17
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.51
8.1.180.0030.00518.10
8.1.170.0030.00618.72
8.1.160.0030.00622.02
8.1.150.0040.00418.51
8.1.140.0000.00817.46
8.1.130.0000.00817.92
8.1.120.0040.00417.39
8.1.110.0040.00417.46
8.1.100.0070.00017.32
8.1.90.0050.00217.42
8.1.80.0030.00317.41
8.1.70.0030.00317.40
8.1.60.0030.00717.63
8.1.50.0040.00417.45
8.1.40.0000.00817.48
8.1.30.0000.00717.66
8.1.20.0090.00017.66
8.1.10.0000.00717.60
8.1.00.0040.00417.53
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0070.00018.29
8.0.270.0000.00717.23
8.0.260.0070.00016.73
8.0.250.0070.00016.98
8.0.240.0000.00716.94
8.0.230.0070.00016.85
8.0.220.0040.00416.81
8.0.210.0070.00016.87
8.0.200.0030.00316.99
8.0.190.0000.00716.84
8.0.180.0040.00416.99
8.0.170.0030.00516.97
8.0.160.0070.00016.96
8.0.150.0070.00016.83
8.0.140.0080.00016.75
8.0.130.0030.00313.36
8.0.120.0080.00016.85
8.0.110.0000.00716.96
8.0.100.0070.00016.87
8.0.90.0040.00316.91
8.0.80.0120.01316.95
8.0.70.0040.00416.69
8.0.60.0070.00016.87
8.0.50.0050.00316.97
8.0.30.0120.00916.98
8.0.20.0090.00917.40
8.0.10.0030.00516.97
8.0.00.0130.00616.86
7.4.330.0020.00215.02
7.4.320.0020.00516.55
7.4.300.0070.00016.51
7.4.290.0030.00616.66
7.4.280.0040.00416.51
7.4.270.0000.00716.55
7.4.260.0070.00416.50
7.4.250.0070.00016.45
7.4.240.0030.00416.62
7.4.230.0030.00316.64
7.4.220.0140.01716.72
7.4.210.0080.00816.56
7.4.200.0070.00016.69
7.4.190.0070.00016.64
7.4.160.0050.01016.41
7.4.150.0090.00917.40
7.4.140.0090.00817.86
7.4.130.0130.00616.57
7.4.120.0050.01216.56
7.4.110.0100.01016.49
7.4.100.0090.00916.52
7.4.90.0140.00316.64
7.4.80.0140.00919.39
7.4.70.0120.00916.53
7.4.60.0120.00616.35
7.4.50.0000.00816.51
7.4.40.0060.01022.77
7.4.30.0080.00816.41
7.4.00.0150.00314.86
7.3.330.0000.00513.40
7.3.320.0050.00013.35
7.3.310.0000.00716.36
7.3.300.0000.00716.25
7.3.290.0060.00616.33
7.3.280.0070.00916.28
7.3.270.0090.00917.40
7.3.260.0090.00916.55
7.3.250.0140.00516.53
7.3.240.0000.01716.50
7.3.230.0060.01316.45
7.3.210.0090.00916.54
7.3.200.0100.00619.39
7.3.190.0140.00916.51
7.3.180.0080.00816.41
7.3.170.0000.02116.57
7.3.160.0060.01316.42
7.3.120.0060.00915.09
7.2.330.0100.00716.42
7.2.320.0060.01316.47
7.2.310.0080.00816.43
7.2.300.0080.01116.50
7.2.290.0080.00816.42
7.2.60.0040.01116.78
7.2.00.0060.00619.28
7.1.200.0100.00315.53
7.1.70.0040.00417.23
7.1.60.0000.01017.10
7.1.50.0100.01316.96
7.1.00.0000.08022.51
7.0.200.0000.01016.50
7.0.140.0030.07022.09
7.0.60.0000.08720.03
7.0.50.0100.08017.90
7.0.40.0130.07320.06
7.0.30.0370.06320.17
7.0.20.0270.08320.21
7.0.10.0270.08020.21
7.0.00.0100.08320.23
5.6.280.0070.06720.84
5.6.210.0030.04320.55
5.6.200.0100.07718.20
5.6.190.0100.04020.63
5.6.180.0370.07320.53
5.6.170.0230.08020.47
5.6.160.0030.08320.39
5.6.150.0030.06718.23
5.6.140.0030.08318.21
5.6.130.0030.08018.20
5.6.120.0070.05720.97
5.6.110.0030.06321.01
5.6.100.0100.08020.96
5.6.90.0030.09020.88
5.6.80.0030.05320.43
5.6.70.3730.04020.46
5.5.350.0400.07020.47
5.5.340.0030.04018.07
5.5.330.0100.08020.42
5.5.320.0230.08020.36
5.5.310.0230.06020.27
5.5.300.0100.07317.95
5.5.290.0200.05317.92
5.5.280.0070.06020.91
5.5.270.0170.07020.85
5.5.260.0130.08020.88
5.5.250.0130.08020.70
5.5.240.0070.05020.18
5.4.450.0630.06019.34
5.4.440.0770.06019.55
5.4.430.0170.04719.47
5.4.420.0170.05019.43
5.4.410.0300.03719.02
5.4.400.0270.05018.87
5.4.390.0270.05318.85
5.4.380.0230.05318.57
5.4.370.0130.03718.68
5.4.360.0100.03718.76
5.4.350.0070.03812.03
5.4.340.0070.03312.03
5.4.320.0050.03812.51
5.4.310.0080.04112.51
5.4.300.0120.03312.51
5.4.290.0080.04212.51
5.4.280.0070.03512.41
5.4.270.0130.05718.73
5.4.260.0130.05018.90
5.4.250.0130.07318.94
5.4.240.0130.07318.97
5.4.230.0100.05018.86
5.4.220.0070.06318.93
5.4.210.0070.06018.89
5.4.200.0100.05318.86
5.4.190.0070.06719.06
5.4.180.0030.05319.07
5.4.170.0030.06718.70
5.4.160.0100.07318.96
5.4.150.0130.07018.90
5.4.140.0100.05316.55
5.4.130.0170.06316.36
5.4.120.0200.04716.44
5.4.110.0170.06316.45
5.4.100.0130.04316.68
5.4.90.0130.06316.50
5.4.80.0070.07016.37
5.4.70.0200.06316.43
5.4.60.0100.05316.57
5.4.50.0100.05316.39
5.4.40.0000.08016.55
5.4.30.0130.04316.41
5.4.20.0070.05316.47
5.4.10.0070.06016.26
5.4.00.0070.06715.88
5.3.290.0090.04112.80
5.3.280.0130.05714.68
5.3.270.0070.05714.62
5.3.260.0100.06014.78
5.3.250.0170.04714.63
5.3.240.0100.04714.75
5.3.230.0070.06314.59
5.3.220.0200.05014.74
5.3.210.0070.05714.56
5.3.200.0130.06714.66
5.3.190.0200.05714.65
5.3.180.0170.05014.48
5.3.170.0030.05314.65
5.3.160.0130.04314.59
5.3.150.0130.06014.56
5.3.140.0070.07014.79
5.3.130.0070.07314.57
5.3.120.0130.07014.78
5.3.110.0200.04314.54
5.3.100.0070.07314.03
5.3.90.0000.05714.16
5.3.80.0200.04314.11
5.3.70.0130.05314.11
5.3.60.0200.06013.99
5.3.50.0130.05013.79
5.3.40.0070.07314.14
5.3.30.0070.05313.93
5.3.20.0130.05313.63
5.3.10.0070.06713.72
5.3.00.0100.06313.71
5.2.170.0130.05011.14
5.2.160.0000.05311.15
5.2.150.0030.04311.24
5.2.140.0030.05011.23
5.2.130.0070.05711.19
5.2.120.0100.03711.09
5.2.110.0030.04311.09
5.2.100.0070.04311.20
5.2.90.0130.05011.34
5.2.80.0030.04711.18
5.2.70.0030.06711.16
5.2.60.0100.04311.24
5.2.50.0070.06311.25
5.2.40.0030.04311.09
5.2.30.0070.05011.06
5.2.20.0030.04710.80
5.2.10.0070.05310.96
5.2.00.0070.04010.87
5.1.60.0100.0409.86
5.1.50.0070.04710.01
5.1.40.0070.0479.96
5.1.30.0130.02710.52
5.1.20.0070.04010.59
5.1.10.0170.05010.08
5.1.00.0000.05710.17
5.0.50.0070.0338.58
5.0.40.0030.0338.42
5.0.30.0070.0438.21
5.0.20.0100.0208.25
5.0.10.0030.0408.34
5.0.00.0070.0508.23
4.4.90.0030.0205.76
4.4.80.0030.0235.85
4.4.70.0100.0175.81
4.4.60.0030.0305.82
4.4.50.0030.0235.86
4.4.40.0000.0505.85
4.4.30.0100.0175.76
4.4.20.0030.0235.88
4.4.10.0200.0175.89
4.4.00.0030.0435.88
4.3.110.0000.0275.79
4.3.100.0030.0305.75
4.3.90.0000.0375.75
4.3.80.0070.0405.75
4.3.70.0030.0235.87
4.3.60.0030.0205.75
4.3.50.0000.0335.71
4.3.40.0070.0405.71
4.3.30.0030.0275.39
4.3.20.0030.0275.39
4.3.10.0030.0275.39
4.3.00.0130.0236.71

preferences:
47.96 ms | 401 KiB | 5 Q