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(a $object) { $this->object = $object; } public function getObject() { return $this->object; } public function __clone() { $this->object = clone $this->object; } } class runner extends b { public $target; public function __construct() { parent::__construct(); $this->target = new b(); } public function run() { $object1 = new stdClass(); $object1->name = "object1"; $object2 = new stdClass(); $object2->name = "object2"; if (1 == 2) { // } elseif ($object1 instanceof $this->target->object) { $b2 = clone $this->target; $b2->object = $object1; echo $b2->object->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.0090.00918.30
8.3.50.0080.00821.15
8.3.40.0070.00718.71
8.3.30.0050.01019.22
8.3.20.0040.00420.34
8.3.10.0040.00422.03
8.3.00.0080.00022.44
8.2.180.0090.00616.50
8.2.170.0100.01022.96
8.2.160.0120.00319.22
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0080.00019.41
8.2.110.0000.01119.14
8.2.100.0040.00717.75
8.2.90.0040.00419.17
8.2.80.0000.00917.97
8.2.70.0000.00917.63
8.2.60.0090.00017.80
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0040.00418.13
8.2.20.0040.00417.68
8.2.10.0040.00417.81
8.2.00.0070.00017.63
8.1.280.0120.00325.92
8.1.270.0080.00018.48
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.13
8.1.230.0060.00617.66
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0040.00417.22
8.1.190.0000.00817.55
8.1.180.0000.00818.69
8.1.170.0000.00818.41
8.1.160.0050.00222.02
8.1.150.0040.00418.59
8.1.140.0080.00017.39
8.1.130.0000.00617.88
8.1.120.0040.00417.43
8.1.110.0050.00217.35
8.1.100.0000.00817.43
8.1.90.0030.00517.43
8.1.80.0030.00317.39
8.1.70.0030.00517.34
8.1.60.0030.00517.59
8.1.50.0060.00317.43
8.1.40.0000.00817.58
8.1.30.0030.00517.57
8.1.20.0030.00517.65
8.1.10.0000.00717.49
8.1.00.0000.00917.41
8.0.300.0080.00018.77
8.0.290.0000.00917.04
8.0.280.0040.00418.46
8.0.270.0000.00817.33
8.0.260.0030.00516.80
8.0.250.0030.00317.04
8.0.240.0030.00516.93
8.0.230.0000.00716.84
8.0.220.0070.00016.95
8.0.210.0070.00016.79
8.0.200.0000.00716.85
8.0.190.0040.00416.84
8.0.180.0000.00816.93
8.0.170.0000.00716.94
8.0.160.0080.00016.79
8.0.150.0050.00216.84
8.0.140.0040.00416.76
8.0.130.0050.00013.39
8.0.120.0040.00416.85
8.0.110.0000.00716.81
8.0.100.0040.00416.96
8.0.90.0080.00016.92
8.0.80.0060.00916.93
8.0.70.0040.00416.87
8.0.60.0000.00816.79
8.0.50.0040.00416.90
8.0.30.0090.01017.05
8.0.20.0080.01217.40
8.0.10.0040.00416.87
8.0.00.0050.01316.98
7.4.330.0050.00015.00
7.4.320.0030.00316.56
7.4.300.0060.00016.42
7.4.290.0000.00716.61
7.4.280.0000.00716.52
7.4.270.0030.00316.38
7.4.260.0070.00016.54
7.4.250.0050.00216.41
7.4.240.0050.00216.48
7.4.230.0000.00716.49
7.4.220.0000.01816.54
7.4.210.0060.00816.65
7.4.200.0000.00716.61
7.4.190.0030.00316.74
7.4.160.0080.00816.43
7.4.150.0090.00917.40
7.4.140.0140.00817.86
7.4.130.0130.00816.61
7.4.120.0070.01016.45
7.4.110.0070.01016.59
7.4.100.0110.01116.62
7.4.90.0110.00616.48
7.4.80.0090.01419.39
7.4.70.0060.01116.38
7.4.60.0040.01116.60
7.4.50.0000.00816.48
7.4.40.0040.01522.77
7.4.30.0030.01216.61
7.4.00.0080.01014.94
7.3.330.0000.00513.45
7.3.320.0000.00513.38
7.3.310.0000.00716.46
7.3.300.0000.00616.40
7.3.290.0110.00316.50
7.3.280.0050.01016.43
7.3.270.0150.00717.40
7.3.260.0070.01116.61
7.3.250.0150.00216.45
7.3.240.0160.00616.39
7.3.230.0080.00816.41
7.3.210.0120.01516.40
7.3.200.0100.00619.39
7.3.190.0110.00616.70
7.3.180.0110.00616.32
7.3.170.0130.00316.65
7.3.160.0060.01016.40
7.3.120.0100.00714.84
7.3.110.0100.00615.00
7.3.100.0030.01014.84
7.3.90.0030.00714.77
7.3.80.0060.01014.63
7.3.70.0030.01014.98
7.3.60.0090.00614.91
7.3.50.0030.01014.96
7.3.40.0060.01015.00
7.3.30.0120.00614.89
7.3.20.0110.00316.53
7.3.10.0000.00916.47
7.3.00.0110.00316.44
7.2.330.0100.00916.72
7.2.320.0140.01116.77
7.2.310.0060.01316.75
7.2.300.0100.00716.48
7.2.290.0130.00316.52
7.2.250.0030.00914.88
7.2.240.0060.00914.68
7.2.230.0100.00715.08
7.2.220.0060.00915.25
7.2.210.0040.00714.98
7.2.200.0060.00915.21
7.2.190.0100.00714.81
7.2.180.0070.00714.84
7.2.170.0110.00415.08
7.2.130.0110.00816.81
7.2.120.0100.00716.81
7.2.110.0090.00616.64
7.2.100.0090.00316.78
7.2.90.0180.00016.57
7.2.80.0150.00416.91
7.2.70.0100.00616.50
7.2.60.0160.00016.76
7.2.50.0070.01016.96
7.2.40.0130.00716.92
7.2.30.0100.00616.70
7.2.20.0100.00716.79
7.2.10.0100.01016.82
7.2.00.0030.01118.12
7.1.330.0030.01415.69
7.1.320.0060.00915.76
7.1.310.0110.00415.82
7.1.300.0060.00615.92
7.1.290.0090.00616.02
7.1.280.0070.01015.90
7.1.270.0040.01115.67
7.1.260.0170.00015.78
7.1.250.0070.01115.77
7.1.240.0040.00815.91
7.1.230.0130.00715.68
7.1.220.0080.00815.67
7.1.210.0110.00715.69
7.1.200.0070.00415.75
7.1.190.0030.01415.68
7.1.180.0100.00715.67
7.1.170.0070.01115.76
7.1.160.0100.00715.65
7.1.150.0100.00715.68
7.1.140.0060.00615.69
7.1.130.0120.00615.77
7.1.120.0040.00715.66
7.1.110.0100.00715.88
7.1.100.0030.00816.98
7.1.90.0100.01015.94
7.1.80.0090.00615.70
7.1.70.0090.00416.34
7.1.60.0070.00616.48
7.1.50.0120.01016.31
7.1.40.0090.00415.54
7.1.30.0100.00315.74
7.1.20.0060.00615.61
7.1.10.0070.00715.64
7.1.00.0060.03019.14
7.0.330.0040.00715.14
7.0.320.0120.00415.21
7.0.310.0100.00315.28
7.0.300.0120.00615.09
7.0.290.0030.00915.39
7.0.280.0100.00715.09
7.0.270.0100.00315.37
7.0.260.0090.00615.26
7.0.250.0120.00615.27
7.0.240.0110.00315.38
7.0.230.0100.01015.38
7.0.220.0000.01015.43
7.0.210.0060.00315.26
7.0.200.0070.01015.98
7.0.190.0140.00315.35
7.0.180.0100.00715.39
7.0.170.0100.00015.14
7.0.160.0070.01015.10
7.0.150.0030.01015.10
7.0.140.0050.04018.62
7.0.130.0090.00015.09
7.0.120.0060.00615.61
7.0.110.0100.00315.09
7.0.100.0060.00315.35
7.0.90.0030.01015.38
7.0.80.0100.00315.31
7.0.70.0060.00615.43
7.0.60.0070.04517.62
7.0.50.0000.04916.77
7.0.40.0100.02016.83
7.0.30.0220.03916.73
7.0.20.0180.03816.82
7.0.10.0110.02916.78
7.0.00.0080.04816.69
5.6.380.0070.00714.60
5.6.370.0000.01514.20
5.6.360.0030.00914.04
5.6.350.0040.00414.43
5.6.340.0150.00014.41
5.6.330.0060.00614.55
5.6.320.0000.00914.55
5.6.310.0060.00914.44
5.6.300.0000.00814.59
5.6.290.0030.00914.55
5.6.280.0050.03817.79
5.6.270.0030.00614.39
5.6.260.0040.00814.49
5.6.250.0070.00714.25
5.6.240.0060.00914.71
5.6.230.0030.00714.39
5.6.220.0060.00614.48
5.6.210.0100.04017.40
5.6.200.0030.02516.21
5.6.190.0030.04717.48
5.6.180.1700.03117.26
5.6.170.0160.02617.25
5.6.160.0070.04917.46
5.6.150.0060.04416.21
5.6.140.0030.02516.31
5.6.130.0030.04816.44
5.6.120.0060.02517.64
5.6.110.0150.03517.81
5.6.100.0120.03917.67
5.6.90.0100.03817.91
5.6.80.0080.04317.43
5.6.70.0160.03817.41
5.6.60.0070.00714.36
5.6.50.0030.01414.39
5.6.40.0080.00414.05
5.6.30.0070.00414.02
5.6.20.0000.01114.21
5.6.10.0030.01014.34
5.6.00.0070.00314.17
5.5.380.0050.00011.53
5.5.370.0000.00511.44
5.5.360.0030.00611.33
5.5.350.0480.03315.94
5.5.340.0090.03514.61
5.5.330.0050.02515.83
5.5.320.0140.04115.75
5.5.310.0130.02015.71
5.5.300.0030.03814.63
5.5.290.0090.02414.58
5.5.280.0020.03716.10
5.5.270.0060.02216.00
5.5.260.0030.04116.12
5.5.250.0050.04615.97
5.5.240.0050.04715.79
5.5.230.0030.00911.18
5.5.220.0030.01011.18
5.5.210.0060.00311.18
5.5.200.0040.00811.34
5.5.190.0060.00611.18
5.5.180.0030.00711.25
5.5.170.0060.00611.33
5.5.160.0060.00611.18
5.5.150.0040.00711.18
5.5.140.0070.00411.39
5.5.130.0000.01111.18
5.5.120.0060.00311.21
5.5.110.0080.00011.18
5.5.100.0050.00511.18
5.5.90.0070.00011.18
5.5.80.0000.01011.18
5.5.70.0070.00311.24
5.5.60.0080.00011.25
5.5.50.0000.00811.18
5.5.40.0030.00311.18
5.5.30.0030.00711.18
5.5.20.0050.00811.18
5.5.10.0140.00011.18
5.5.00.0020.00711.18
5.4.450.0020.03815.39
5.4.440.0370.03115.44
5.4.430.0400.03215.42
5.4.420.0350.03615.25
5.4.410.0400.02315.21
5.4.400.0650.02915.03
5.4.390.0640.03314.95
5.4.380.0190.03014.88
5.4.370.0100.02714.82
5.4.360.0090.02714.92
5.4.350.0130.02614.82
5.4.340.0070.03114.87
5.4.330.0000.00811.18
5.4.320.0070.02011.85
5.4.310.0060.02211.84
5.4.300.0040.02111.84
5.4.290.0030.02211.84
5.4.280.0060.02111.79
5.4.270.0050.04215.05
5.4.260.0030.03515.09
5.4.250.0030.04015.05
5.4.240.0070.04115.09
5.4.230.0110.04014.91
5.4.220.0070.03414.92
5.4.210.0060.03014.95
5.4.200.0080.03015.00
5.4.190.0050.03915.04
5.4.180.0120.03514.98
5.4.170.0040.02814.96
5.4.160.0090.02815.03
5.4.150.0050.03014.98
5.4.140.0060.02813.81
5.4.130.0050.02713.77
5.4.120.0050.04113.88
5.4.110.0050.04213.82
5.4.100.0110.02613.84
5.4.90.0100.02513.91
5.4.80.0050.02913.90
5.4.70.0070.03013.87
5.4.60.0100.02713.72
5.4.50.0070.03013.78
5.4.40.0010.03113.81
5.4.30.0070.02513.70
5.4.20.0080.02313.86
5.4.10.0070.02813.75
5.4.00.0020.03213.51
5.3.290.0030.02311.99
5.3.280.0080.03012.93
5.3.270.0100.02512.94
5.3.260.0050.04013.01
5.3.250.0070.02812.81
5.3.240.0040.02912.98
5.3.230.0060.02812.89
5.3.220.0030.03212.92
5.3.210.0050.03112.95
5.3.200.0080.03312.97
5.3.190.0050.03212.92
5.3.180.0080.03212.79
5.3.170.0050.02812.79
5.3.160.0070.02712.79
5.3.150.0030.03512.91
5.3.140.0020.03112.79
5.3.130.0050.02812.86
5.3.120.0050.03012.85
5.3.110.0030.03912.86
5.3.100.0070.02512.62
5.3.90.0040.02712.61
5.3.80.0030.02812.51
5.3.70.0050.02812.58
5.3.60.0090.03012.54
5.3.50.0080.03512.52
5.3.40.0070.02812.62
5.3.30.0050.02712.59
5.3.20.0070.02512.55
5.3.10.0020.02912.40
5.3.00.0020.03112.36
5.2.170.0060.02011.12
5.2.160.0050.02311.21
5.2.150.0020.02511.14
5.2.140.0020.02511.19
5.2.130.0050.02011.14
5.2.120.0100.01811.19
5.2.110.0000.02411.14
5.2.100.0020.02511.18
5.2.90.0030.02711.13
5.2.80.0060.02011.18
5.2.70.0040.02211.22
5.2.60.0030.02511.16
5.2.50.0060.02011.02
5.2.40.0030.02311.09
5.2.30.0070.02711.05
5.2.20.0020.02411.07
5.2.10.0080.01811.00
5.2.00.0120.02310.93
5.1.60.0060.01710.64
5.1.50.0000.02310.55
5.1.40.0050.02010.50
5.1.30.0050.02010.85
5.1.20.0030.02010.85
5.1.10.0020.02010.75
5.1.00.0090.01510.59
5.0.50.0020.0159.98
5.0.40.0020.0169.83
5.0.30.0050.0229.75
5.0.20.0030.0159.73
5.0.10.0020.0159.73
5.0.00.0070.0189.68
4.4.90.0030.0129.23
4.4.80.0020.0129.23
4.4.70.0050.0109.23
4.4.60.0040.0109.23
4.4.50.0020.0129.23
4.4.40.0020.0179.23
4.4.30.0050.0109.23
4.4.20.0020.0129.23
4.4.10.0010.0139.23
4.4.00.0030.0179.23
4.3.110.0000.0199.23
4.3.100.0030.0109.23
4.3.90.0020.0109.23
4.3.80.0030.0189.23
4.3.70.0030.0129.23
4.3.60.0060.0069.23
4.3.50.0010.0159.23
4.3.40.0060.0159.23
4.3.30.0000.0169.23
4.3.20.0070.0109.23
4.3.10.0020.0129.23
4.3.00.0120.0128.96

preferences:
41.03 ms | 401 KiB | 5 Q