3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { } class b extends a { 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 $target; public function __construct() { $this->target = new b(); } public function run() { $object1 = new stdClass(); $object1->name = "object1"; $object2 = new stdClass(); $object2->name = "object2"; if ($object1 instanceof $this->target->object) { $b2 = clone $this->target; $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.40.0100.00718.79
8.3.30.0030.01019.22
8.3.20.0070.00020.29
8.3.10.0040.00422.04
8.3.00.0080.00022.44
8.2.170.0190.00022.96
8.2.160.0070.01020.47
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00419.26
8.2.110.0060.00321.04
8.2.100.0090.00317.84
8.2.90.0050.00319.02
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0060.00317.93
8.2.50.0060.00318.10
8.2.40.0050.00220.47
8.2.30.0040.00417.96
8.2.20.0000.00717.79
8.2.10.0040.00419.59
8.2.00.0040.00417.81
8.1.270.0040.00422.05
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0000.00919.14
8.1.230.0080.00317.70
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0080.00017.23
8.1.180.0000.01018.10
8.1.170.0030.00618.39
8.1.160.0050.00222.03
8.1.150.0040.00418.50
8.1.140.0080.00017.36
8.1.130.0070.00017.88
8.1.120.0040.00417.48
8.1.110.0000.00717.41
8.1.100.0060.00317.38
8.1.90.0040.00417.34
8.1.80.0070.00017.30
8.1.70.0000.00717.41
8.1.60.0030.00617.60
8.1.50.0060.00317.53
8.1.40.0040.00417.43
8.1.30.0070.00017.70
8.1.20.0000.00817.60
8.1.10.0000.00717.47
8.1.00.0030.00517.44
8.0.300.0060.00618.77
8.0.290.0040.00716.75
8.0.280.0000.00818.46
8.0.270.0000.00717.21
8.0.260.0060.00016.83
8.0.250.0000.00716.99
8.0.240.0030.00317.01
8.0.230.0070.00016.85
8.0.220.0030.00316.95
8.0.210.0000.00716.89
8.0.200.0040.00417.01
8.0.190.0040.00417.00
8.0.180.0070.00016.99
8.0.170.0040.00416.91
8.0.160.0000.00816.74
8.0.150.0030.00516.71
8.0.140.0040.00416.83
8.0.130.0000.00513.42
8.0.120.0040.00416.76
8.0.110.0030.00516.77
8.0.100.0040.00416.85
8.0.90.0070.00016.81
8.0.80.0150.00316.86
8.0.70.0080.00016.96
8.0.60.0030.00316.78
8.0.50.0080.00016.93
8.0.30.0170.00916.96
8.0.20.0120.00617.41
8.0.10.0020.00517.10
8.0.00.0080.01316.79
7.4.330.0050.00015.13
7.4.320.0060.00016.67
7.4.300.0070.00016.53
7.4.290.0070.00316.50
7.4.280.0000.00716.52
7.4.270.0000.00716.52
7.4.260.0030.00616.65
7.4.250.0000.00716.48
7.4.240.0000.00716.52
7.4.230.0070.00016.60
7.4.220.0110.01116.70
7.4.210.0100.00916.61
7.4.200.0000.00716.45
7.4.190.0000.00716.56
7.4.160.0000.01516.64
7.4.150.0170.00017.40
7.4.140.0110.00917.86
7.4.130.0050.01416.58
7.4.120.0110.00616.67
7.4.110.0060.01016.41
7.4.100.0060.01716.46
7.4.90.0090.01216.64
7.4.80.0120.00619.39
7.4.70.0030.01416.38
7.4.60.0060.01216.57
7.4.50.0030.00316.56
7.4.40.0150.00022.77
7.4.30.0100.00616.57
7.4.10.0150.00415.24
7.4.00.0070.01014.96
7.3.330.0000.00613.21
7.3.320.0060.00013.38
7.3.310.0030.00316.37
7.3.300.0030.00316.25
7.3.290.0070.01416.39
7.3.280.0110.00616.35
7.3.270.0110.00717.40
7.3.260.0130.00316.50
7.3.250.0100.01116.42
7.3.240.0030.01316.56
7.3.230.0070.01116.49
7.3.210.0160.00016.47
7.3.200.0070.01019.39
7.3.190.0160.00016.61
7.3.180.0060.00916.35
7.3.170.0130.00316.35
7.3.160.0060.01316.61
7.3.130.0100.00714.66
7.3.120.0090.00514.91
7.3.110.0060.01314.75
7.3.100.0060.00814.82
7.3.90.0000.01614.69
7.3.80.0030.00914.66
7.3.70.0060.01014.76
7.3.60.0040.01114.49
7.3.50.0060.01014.75
7.3.40.0130.00314.73
7.3.30.0000.01214.68
7.3.20.0060.00916.74
7.3.10.0000.01516.56
7.3.00.0060.00916.54
7.2.330.0110.00716.44
7.2.320.0140.00716.63
7.2.310.0000.01716.71
7.2.300.0140.00716.60
7.2.290.0100.00716.80
7.2.260.0100.01015.07
7.2.250.0110.00814.90
7.2.240.0090.00614.90
7.2.230.0080.00414.78
7.2.220.0130.00014.89
7.2.210.0030.01214.95
7.2.200.0040.01214.97
7.2.190.0000.00914.84
7.2.180.0090.00614.91
7.2.170.0090.00015.05
7.2.160.0070.00414.91
7.2.150.0000.01516.90
7.2.140.0000.01316.82
7.2.130.0070.00716.89
7.2.120.0090.00916.87
7.2.110.0060.00916.63
7.2.100.0030.01016.80
7.2.90.0030.01016.98
7.2.80.0100.00716.87
7.2.70.0090.00916.94
7.2.60.0060.00616.96
7.2.50.0030.01016.90
7.2.40.0040.01116.79
7.2.30.0040.00716.99
7.2.20.0040.00716.63
7.2.10.0000.01616.74
7.2.00.0050.01218.30
7.1.330.0070.00715.48
7.1.320.0060.00615.76
7.1.310.0040.01115.91
7.1.300.0000.01615.55
7.1.290.0030.01315.46
7.1.280.0000.01215.91
7.1.270.0060.00915.71
7.1.260.0000.01215.53
7.1.250.0070.00415.79
7.1.240.0120.00315.56
7.1.230.0060.00615.68
7.1.220.0040.00415.84
7.1.210.0070.00715.68
7.1.200.0050.01015.46
7.1.190.0030.01415.85
7.1.180.0060.00615.79
7.1.170.0090.00615.50
7.1.160.0030.00615.76
7.1.150.0000.01315.59
7.1.140.0030.00915.65
7.1.130.0090.00315.91
7.1.120.0030.01415.79
7.1.110.0030.00515.51
7.1.100.0050.00916.78
7.1.90.0070.00315.69
7.1.80.0000.01615.70
7.1.70.0060.00516.45
7.1.60.0080.01117.78
7.1.50.0020.00916.06
7.1.40.0040.00415.65
7.1.30.0100.00315.47
7.1.20.0120.00315.84
7.1.10.0030.00615.68
7.1.00.0070.04018.86
7.0.330.0000.01715.21
7.0.320.0030.00615.36
7.0.310.0030.00615.47
7.0.300.0000.01315.44
7.0.290.0060.00615.01
7.0.280.0030.01015.24
7.0.270.0060.00615.14
7.0.260.0000.01515.50
7.0.250.0080.00815.27
7.0.240.0040.00415.52
7.0.230.0000.01215.14
7.0.220.0000.01515.59
7.0.210.0000.01415.59
7.0.200.0030.00716.05
7.0.190.0000.01015.10
7.0.180.0040.01215.53
7.0.170.0040.01115.56
7.0.160.0060.00815.41
7.0.150.0070.00315.39
7.0.140.0020.04518.49
7.0.130.0060.00915.48
7.0.120.0060.00915.12
7.0.110.0050.00815.26
7.0.100.0090.00415.43
7.0.90.0050.00815.50
7.0.80.0080.01115.23
7.0.70.0070.00715.49
7.0.60.0060.04717.60
7.0.50.0030.04716.76
7.0.40.0100.02916.83
7.0.30.0200.04016.76
7.0.20.0110.03016.87
7.0.10.0070.04316.76
7.0.00.0030.03316.78
5.6.400.0030.00614.34
5.6.390.0070.01114.72
5.6.380.0030.01014.64
5.6.370.0060.00914.23
5.6.360.0090.00314.48
5.6.350.0000.01014.24
5.6.340.0000.01414.52
5.6.330.0060.01014.67
5.6.320.0030.00914.40
5.6.310.0030.01214.53
5.6.300.0030.00914.54
5.6.290.0030.01014.36
5.6.280.0020.04017.71
5.6.270.0090.00614.53
5.6.260.0070.00714.50
5.6.250.0100.00614.36
5.6.240.0080.00814.28
5.6.230.0090.00914.25
5.6.220.0040.00414.24
5.6.210.0110.04017.47
5.6.200.0070.04516.29
5.6.190.0070.03217.48
5.6.180.0220.04217.49
5.6.170.0170.04017.45
5.6.160.0070.02517.61
5.6.150.0120.04016.35
5.6.140.0030.02516.38
5.6.130.0050.04516.41
5.6.120.0070.04517.72
5.6.110.0060.04017.66
5.6.100.0050.04517.80
5.6.90.0090.03217.79
5.6.80.0070.02517.40
5.6.70.2310.02817.40
5.6.60.0040.01114.19
5.6.50.0040.00414.54
5.6.40.0000.01314.45
5.6.30.0110.00714.39
5.6.20.0070.01014.37
5.6.10.0040.00414.22
5.6.00.0000.01314.13
5.5.380.0090.00614.23
5.5.370.0070.01014.21
5.5.360.0090.00614.30
5.5.350.0070.03717.28
5.5.340.0030.03416.28
5.5.330.0050.03917.35
5.5.320.0170.03717.11
5.5.310.0110.02517.28
5.5.300.0080.03716.23
5.5.290.0070.04016.10
5.5.280.0030.02817.52
5.5.270.0130.03817.57
5.5.260.0050.03817.62
5.5.250.0050.04017.51
5.5.240.0050.03517.27
5.5.230.0030.01314.37
5.5.220.0070.00714.30
5.5.210.0070.00314.07
5.5.200.0070.00714.33
5.5.190.0030.01314.33
5.5.180.0070.00714.16
5.5.170.0040.01114.31
5.5.160.0060.00914.30
5.5.150.0120.00614.15
5.5.140.0100.00614.13
5.5.130.0060.00614.29
5.5.120.0090.00614.07
5.5.110.0080.00613.93
5.5.100.0030.01014.29
5.5.90.0030.00614.20
5.5.80.0070.00714.19
5.5.70.0110.00314.02
5.5.60.0110.00013.84
5.5.50.0070.01113.96
5.5.40.0040.01114.54
5.5.30.0030.01014.31
5.5.20.0090.00314.06
5.5.10.0120.00314.07
5.5.00.0000.01614.09
5.4.450.0100.03115.24
5.4.440.0150.03215.29
5.4.430.0070.02815.34
5.4.420.0080.03315.28
5.4.410.0080.04015.19
5.4.400.0720.00314.93
5.4.390.0350.00514.89
5.4.380.0170.02814.82
5.4.370.0070.03214.90
5.4.360.0130.02814.96
5.4.350.0050.03714.66
5.4.340.0080.03014.94
5.4.330.0000.01110.99
5.4.320.0050.02211.73
5.4.310.0060.02411.91
5.4.300.0020.02511.91
5.4.290.0040.02511.76
5.4.280.0050.02211.76
5.4.270.0080.03014.90
5.4.260.0030.03215.12
5.4.250.0070.04514.76
5.4.240.0120.02814.86
5.4.230.0040.04214.86
5.4.220.0060.03814.95
5.4.210.0050.04314.89
5.4.200.0120.03515.15
5.4.190.0090.03415.01
5.4.180.0050.03115.02
5.4.170.0110.03315.05
5.4.160.0060.03114.67
5.4.150.0050.03114.97
5.4.140.0050.03513.57
5.4.130.0070.03313.78
5.4.120.0070.03813.68
5.4.110.0140.03513.89
5.4.100.0030.02913.60
5.4.90.0070.03213.86
5.4.80.0080.02913.70
5.4.70.0050.03713.80
5.4.60.0090.03913.76
5.4.50.0050.02813.79
5.4.40.0150.02513.83
5.4.30.0120.03213.72
5.4.20.0060.02913.63
5.4.10.0000.04713.61
5.4.00.0090.02913.42
5.3.290.0090.02411.80
5.3.280.0090.03212.59
5.3.270.0100.03612.61
5.3.260.0070.03912.78
5.3.250.0110.02712.69
5.3.240.0100.02512.55
5.3.230.0090.02912.74
5.3.220.0030.03712.54
5.3.210.0090.03312.55
5.3.200.0080.03512.43
5.3.190.0100.03012.63
5.3.180.0080.03412.59
5.3.170.0040.03112.64
5.3.160.0090.03612.60
5.3.150.0050.04212.69
5.3.140.0100.03312.64
5.3.130.0060.03112.61
5.3.120.0100.03112.58
5.3.110.0040.03012.65
5.3.100.0140.03212.17
5.3.90.0100.03412.33
5.3.80.0070.02812.30
5.3.70.0100.02512.32
5.3.60.0100.02412.23
5.3.50.0050.03812.34
5.3.40.0080.02612.34
5.3.30.0050.04012.07
5.3.20.0000.03111.88
5.3.10.0110.02512.03
5.3.00.0030.03011.98
5.2.170.0030.04711.24
5.2.160.0070.04711.14
5.2.150.0100.05710.98
5.2.140.0030.04311.22
5.2.130.0000.04711.20
5.2.120.0100.05311.07
5.2.110.0100.05011.10
5.2.100.0070.04011.29
5.2.90.0030.04711.20
5.2.80.0100.03711.17
5.2.70.0030.04311.17
5.2.60.0170.03311.23
5.2.50.0070.04010.86
5.2.40.0000.06010.96
5.2.30.0100.05311.07
5.2.20.0070.04310.96
5.2.10.0070.03710.87
5.2.00.0100.04710.82
5.1.60.0130.04010.20
5.1.50.0130.02710.07
5.1.40.0030.0379.98
5.1.30.0130.04010.44
5.1.20.0000.04310.58
5.1.10.0100.03310.07
5.1.00.0000.04010.27
5.0.50.0030.0408.55
5.0.40.0030.0378.49
5.0.30.0030.0408.33
5.0.20.0070.0338.25
5.0.10.0030.0308.18
5.0.00.0030.0408.01
4.4.90.0070.0275.86
4.4.80.0000.0235.81
4.4.70.0000.0235.74
4.4.60.0070.0305.82
4.4.50.0070.0235.84
4.4.40.0030.0375.82
4.4.30.0030.0205.80
4.4.20.0000.0235.82
4.4.10.0030.0305.81
4.4.00.0030.0336.00
4.3.110.0070.0205.76
4.3.100.0070.0175.77
4.3.90.0000.0235.71
4.3.80.0030.0335.71
4.3.70.0000.0305.77
4.3.60.0030.0205.82
4.3.50.0030.0205.76
4.3.40.0070.0305.72
4.3.30.0000.0305.71
4.3.20.0030.0305.71
4.3.10.0000.0235.71
4.3.00.0000.0235.91

preferences:
52.44 ms | 400 KiB | 5 Q