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.0070.00718.54
8.3.50.0150.00722.05
8.3.40.0040.01118.84
8.3.30.0110.00419.22
8.3.20.0060.00320.21
8.3.10.0040.00422.05
8.3.00.0060.00322.58
8.2.180.0090.00916.63
8.2.170.0070.01022.96
8.2.160.0130.00620.35
8.2.150.0050.00325.66
8.2.140.0050.00224.66
8.2.130.0070.00726.16
8.2.120.0080.00019.36
8.2.110.0030.00622.20
8.2.100.0080.00417.78
8.2.90.0080.00019.02
8.2.80.0060.00317.97
8.2.70.0110.00017.63
8.2.60.0000.00818.04
8.2.50.0100.00218.07
8.2.40.0040.00418.16
8.2.30.0040.00417.92
8.2.20.0080.00017.68
8.2.10.0040.00419.53
8.2.00.0000.00717.70
8.1.280.0090.00625.92
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0090.00023.80
8.1.230.0070.00719.19
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0080.00017.30
8.1.180.0030.00618.10
8.1.170.0030.00518.50
8.1.160.0050.00321.89
8.1.150.0000.00718.59
8.1.140.0000.00717.39
8.1.130.0070.00017.79
8.1.120.0030.00317.43
8.1.110.0040.00417.45
8.1.100.0060.00317.41
8.1.90.0050.00317.36
8.1.80.0080.00017.39
8.1.70.0000.00717.34
8.1.60.0040.00417.62
8.1.50.0000.00717.54
8.1.40.0030.00617.41
8.1.30.0000.00817.54
8.1.20.0040.00417.65
8.1.10.0000.00717.43
8.1.00.0040.00417.42
8.0.300.0040.00418.77
8.0.290.0040.00417.04
8.0.280.0070.00018.30
8.0.270.0070.00017.22
8.0.260.0030.00316.71
8.0.250.0000.00716.84
8.0.240.0040.00416.96
8.0.230.0070.00016.93
8.0.220.0030.00316.90
8.0.210.0000.00716.77
8.0.200.0060.00016.95
8.0.190.0080.00016.94
8.0.180.0000.00716.83
8.0.170.0000.00816.84
8.0.160.0070.00016.86
8.0.150.0030.00316.80
8.0.140.0000.00716.89
8.0.130.0000.00713.35
8.0.120.0070.00016.86
8.0.110.0000.00716.91
8.0.100.0070.00016.93
8.0.90.0000.00716.90
8.0.80.0040.01216.88
8.0.70.0040.00416.87
8.0.60.0000.00716.82
8.0.50.0030.00516.96
8.0.30.0120.00717.15
8.0.20.0050.01317.40
8.0.10.0050.00316.89
8.0.00.0110.00716.63
7.4.330.0060.00015.00
7.4.320.0060.00016.32
7.4.300.0060.00016.62
7.4.290.0000.00816.51
7.4.280.0000.00816.40
7.4.270.0030.00316.52
7.4.260.0040.00416.61
7.4.250.0040.00416.45
7.4.240.0050.00216.64
7.4.230.0000.00716.50
7.4.220.0130.00716.66
7.4.210.0040.01216.63
7.4.200.0030.00316.64
7.4.190.0000.00716.34
7.4.160.0040.01116.49
7.4.150.0030.01517.40
7.4.140.0090.00917.86
7.4.130.0120.00516.47
7.4.120.0110.00616.57
7.4.110.0100.01016.66
7.4.100.0110.00716.61
7.4.90.0070.01116.55
7.4.80.0090.01219.39
7.4.70.0050.01316.58
7.4.60.0240.02316.44
7.4.50.0040.00416.47
7.4.40.0000.01422.77
7.4.30.0100.00616.57
7.4.00.0050.01015.06
7.3.330.0030.00313.38
7.3.320.0030.00313.16
7.3.310.0040.00416.27
7.3.300.0030.00316.28
7.3.290.0060.00816.37
7.3.280.0090.00916.35
7.3.270.0060.01217.40
7.3.260.0120.00616.52
7.3.250.0100.00616.47
7.3.240.0060.01216.37
7.3.230.0030.01516.64
7.3.210.0100.00716.28
7.3.200.0070.01019.39
7.3.190.0060.01316.29
7.3.180.0040.01416.37
7.3.170.0100.01316.27
7.3.160.0190.00416.57
7.3.120.0030.01214.73
7.3.110.0030.01414.46
7.3.100.0110.00314.84
7.3.90.0110.00414.69
7.3.80.0060.00914.70
7.3.70.0000.01214.82
7.3.60.0070.00714.54
7.3.50.0030.01214.50
7.3.40.0060.00914.93
7.3.30.0050.00514.91
7.3.20.0130.00316.76
7.3.10.0070.00516.56
7.3.00.0070.00516.53
7.2.330.0070.01116.62
7.2.320.0090.00916.73
7.2.310.0100.00716.55
7.2.300.0100.01316.45
7.2.290.0090.00616.68
7.2.250.0080.01115.27
7.2.240.0040.01514.94
7.2.230.0040.01415.16
7.2.220.0060.00615.23
7.2.210.0070.01115.16
7.2.200.0080.00415.06
7.2.190.0040.01414.85
7.2.180.0030.01314.97
7.2.170.0130.00015.09
7.2.130.0060.01016.79
7.2.120.0070.00716.68
7.2.110.0090.00316.88
7.2.100.0080.00816.70
7.2.90.0070.01016.93
7.2.80.0030.00916.92
7.2.70.0070.00417.07
7.2.60.0080.00517.01
7.2.50.0090.00416.94
7.2.40.0100.00716.97
7.2.30.0070.01116.98
7.2.20.0160.00616.88
7.2.10.0030.01016.91
7.2.00.0050.01118.16
7.1.330.0100.00315.62
7.1.320.0060.00615.72
7.1.310.0070.01015.64
7.1.300.0000.01115.85
7.1.290.0090.00615.81
7.1.280.0000.01115.55
7.1.270.0100.00315.78
7.1.260.0060.00915.88
7.1.250.0000.01115.55
7.1.200.0030.00315.53
7.1.100.0050.00518.17
7.1.70.0000.00716.90
7.1.60.0180.00719.82
7.1.50.0070.00316.64
7.1.00.0000.08022.57
7.0.200.0040.00416.74
7.0.140.0000.05021.96
7.0.60.0230.07320.09
7.0.50.0070.07017.88
7.0.40.0130.08720.21
7.0.30.0500.07720.24
7.0.20.0200.03720.23
7.0.10.0000.10020.25
7.0.00.0100.05020.25
5.6.280.0070.07020.90
5.6.210.0030.04320.67
5.6.200.0100.06018.13
5.6.190.0100.04020.77
5.6.180.0370.07720.42
5.6.170.0170.07020.52
5.6.160.0070.04020.47
5.6.150.0200.05718.14
5.6.140.0070.04318.18
5.6.130.0070.08718.26
5.6.120.0130.07720.98
5.6.110.0000.08721.12
5.6.100.0100.05020.98
5.6.90.0130.08320.99
5.6.80.0070.05720.49
5.5.350.0230.06020.48
5.5.340.0070.04318.07
5.5.330.0100.06720.13
5.5.320.0400.07720.27
5.5.310.0230.03320.23
5.5.300.0030.04317.98
5.5.290.0170.07018.04
5.5.280.0100.04020.97
5.5.270.0130.07720.89
5.5.260.0100.05320.88
5.5.250.0100.05720.63
5.5.240.0100.03320.26
5.4.450.0770.04019.63
5.4.440.0170.06319.49
5.4.430.0200.05319.39
5.4.420.0200.04719.52
5.4.410.0230.06319.06
5.4.400.0200.04718.54
5.4.390.0200.04718.84
5.4.380.0100.05318.47
5.4.370.0170.05318.70
5.4.360.0130.05318.59
5.4.350.0170.05718.59
5.4.340.0230.04318.59
5.4.320.0070.03512.50
5.4.310.0030.04312.50
5.4.300.0100.03212.50
5.4.290.0050.05112.50
5.4.280.0050.04212.40
5.4.270.0200.06018.93
5.4.260.0070.05318.78
5.4.250.0070.07719.07
5.4.240.0100.05719.07
5.4.230.0230.05318.78
5.4.220.0100.06318.72
5.4.210.0100.06718.90
5.4.200.0000.06018.70
5.4.190.0200.05318.86
5.4.180.0130.05018.77
5.4.170.0030.06318.92
5.4.160.0170.07018.69
5.4.150.0170.07318.89
5.4.140.0030.05716.66
5.4.130.0100.05016.54
5.4.120.0230.04316.48
5.4.110.0100.08316.30
5.4.100.0170.06316.44
5.4.90.0230.05316.35
5.4.80.0100.07016.32
5.4.70.0070.05716.43
5.4.60.0070.05016.42
5.4.50.0130.06716.36
5.4.40.0030.06016.43
5.4.30.0170.06016.32
5.4.20.0200.04716.32
5.4.10.0200.04316.37
5.4.00.0130.04715.91
5.3.290.0080.03812.80
5.3.280.0070.08014.69
5.3.270.0070.07714.69
5.3.260.0170.06314.69
5.3.250.0130.06714.68
5.3.240.0130.04714.62
5.3.230.0130.05714.69
5.3.220.0130.05714.66
5.3.210.0200.06314.71
5.3.200.0100.05014.48
5.3.190.0070.05014.75
5.3.180.0130.05314.56
5.3.170.0170.04314.73
5.3.160.0130.05314.57
5.3.150.0030.06714.72
5.3.140.0070.07314.64
5.3.130.0130.05014.62
5.3.120.0130.04714.57
5.3.110.0100.07314.46
5.3.100.0200.06314.22
5.3.90.0030.05714.10
5.3.80.0170.06014.00
5.3.70.0170.06714.24
5.3.60.0100.06713.99
5.3.50.0070.05713.93
5.3.40.0070.07014.04
5.3.30.0130.06013.75
5.3.20.0100.05713.55
5.3.10.0030.06313.83
5.3.00.0030.05013.72
5.2.170.0070.04311.05
5.2.160.0100.03711.14
5.2.150.0070.05711.16
5.2.140.0000.05011.32
5.2.130.0100.04011.29
5.2.120.0130.03711.14
5.2.110.0030.05711.07
5.2.100.0100.05311.12
5.2.90.0170.03311.08
5.2.80.0000.05311.09
5.2.70.0070.05711.32
5.2.60.0130.03711.02
5.2.50.0100.04311.12
5.2.40.0070.04711.18
5.2.30.0070.05311.14
5.2.20.0000.04711.14
5.2.10.0030.06010.70
5.2.00.0030.04710.74
5.1.60.0030.04310.00
5.1.50.0030.05010.01
5.1.40.0130.04010.05
5.1.30.0000.04010.50
5.1.20.0100.03310.31
5.1.10.0030.04010.13
5.1.00.0070.03310.14
5.0.50.0130.0338.52
5.0.40.0070.0338.66
5.0.30.0130.0408.33
5.0.20.0100.0338.24
5.0.10.0130.0378.42
5.0.00.0030.0438.09
4.4.90.0070.0235.77
4.4.80.0100.0235.88
4.4.70.0070.0235.86
4.4.60.0000.0305.85
4.4.50.0030.0275.90
4.4.40.0030.0335.81
4.4.30.0000.0235.81
4.4.20.0030.0235.97
4.4.10.0070.0275.88
4.4.00.0030.0435.89
4.3.110.0030.0205.83
4.3.100.0030.0305.78
4.3.90.0100.0235.73
4.3.80.0100.0375.72
4.3.70.0030.0305.74
4.3.60.0030.0305.74
4.3.50.0000.0275.72
4.3.40.0070.0405.73
4.3.30.0030.0305.46
4.3.20.0070.0205.46
4.3.10.0030.0205.46
4.3.00.0070.01713.50

preferences:
34.91 ms | 401 KiB | 5 Q