3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SubObject { static $instances = 0; public $instance; public function __construct() { $this->instance = ++self::$instances; } } class MyCloneable { public $object1; public $object2; function __clone() { // forza la copia di $this->object1, che altrimenti // punterebbe alla stessa istanza. $this->object1 = clone $this->object1; } /*public function __invoke($object1,$object2) { $this->oject1=$object1; $this->oject2=$object2; } */ } $obj = new MyCloneable(); $obj->object1 = new SubObject(); $obj->object2 = new SubObject(); $obj2=new $obj; $obj2->object1 = new SubObject(); $obj2->object2 = new SubObject(); print("Oggetto originale:\n"); print_r($obj); print("Oggetto originale:\n"); print_r($obj2); ?>

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.0100.00316.88
8.3.50.0070.01122.02
8.3.40.0120.00318.84
8.3.30.0040.01118.98
8.3.20.0070.00719.95
8.3.10.0050.00323.40
8.3.00.0080.00019.38
8.2.180.0140.00316.75
8.2.170.0120.00622.96
8.2.160.0160.00020.39
8.2.150.0060.00924.18
8.2.140.0040.00424.66
8.2.130.0130.00326.16
8.2.120.0040.00422.08
8.2.110.0080.00022.30
8.2.100.0000.01217.84
8.2.90.0040.00419.07
8.2.80.0040.00418.03
8.2.70.0000.00917.50
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0080.00018.22
8.2.30.0000.00818.06
8.2.20.0000.00717.70
8.2.10.0040.00418.10
8.2.00.0020.00517.68
8.1.280.0130.00725.92
8.1.270.0070.00723.97
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00323.80
8.1.230.0000.01119.13
8.1.220.0060.00317.79
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0030.00617.43
8.1.180.0050.00318.10
8.1.170.0090.00418.31
8.1.160.0070.00021.96
8.1.150.0040.00418.53
8.1.140.0040.00417.40
8.1.130.0060.00317.76
8.1.120.0040.00417.41
8.1.110.0070.00017.32
8.1.100.0030.00317.45
8.1.90.0000.00717.31
8.1.80.0000.00817.40
8.1.70.0000.00717.39
8.1.60.0090.00317.58
8.1.50.0040.00417.57
8.1.40.0030.00617.41
8.1.30.0000.00917.63
8.1.20.0080.00017.53
8.1.10.0060.00317.49
8.1.00.0040.00417.39
8.0.300.0040.00418.77
8.0.290.0030.00317.18
8.0.280.0070.00018.39
8.0.270.0030.00317.29
8.0.260.0030.00318.38
8.0.250.0030.00316.92
8.0.240.0000.00716.81
8.0.230.0000.00816.97
8.0.220.0030.00316.86
8.0.210.0000.00716.80
8.0.200.0030.00316.87
8.0.190.0030.00616.86
8.0.180.0000.00816.88
8.0.170.0040.00416.83
8.0.160.0030.00316.90
8.0.150.0000.00716.79
8.0.140.0040.00716.86
8.0.130.0000.00513.29
8.0.120.0040.00416.70
8.0.110.0040.00416.85
8.0.100.0100.00016.73
8.0.90.0040.00416.75
8.0.80.0070.01016.78
8.0.70.0030.00516.71
8.0.60.0050.00316.89
8.0.50.0020.00516.91
8.0.30.0110.00817.07
8.0.20.0110.00917.40
8.0.10.0000.00816.98
8.0.00.0100.00916.82
7.4.330.0020.00215.03
7.4.320.0060.00016.46
7.4.300.0060.00016.59
7.4.290.0070.00016.67
7.4.280.0070.00016.52
7.4.270.0000.00716.60
7.4.260.0030.00316.59
7.4.250.0050.00316.41
7.4.240.0020.00516.51
7.4.230.0030.00316.61
7.4.220.0110.00716.62
7.4.210.0060.01016.54
7.4.200.0030.00316.50
7.4.190.0000.00716.68
7.4.160.0130.00316.52
7.4.150.0040.01317.40
7.4.140.0090.01117.86
7.4.130.0080.01016.61
7.4.120.0120.00816.29
7.4.110.0090.01516.55
7.4.100.0070.01016.39
7.4.90.0030.01516.32
7.4.80.0090.01019.39
7.4.70.0130.00916.55
7.4.60.0110.01116.49
7.4.50.0030.00316.51
7.4.40.0000.01522.77
7.4.30.0090.00616.49
7.4.00.0040.01115.25
7.3.330.0000.00513.33
7.3.320.0040.00413.22
7.3.310.0030.00316.27
7.3.300.0020.00516.30
7.3.290.0060.01216.40
7.3.280.0100.00816.38
7.3.270.0110.00617.40
7.3.260.0200.00316.30
7.3.250.0140.00516.36
7.3.240.0090.00816.66
7.3.230.0140.00316.44
7.3.210.0060.01116.39
7.3.200.0090.01319.39
7.3.190.0030.01316.64
7.3.180.0090.00616.63
7.3.170.0140.00316.57
7.3.160.0130.00316.29
7.3.120.0130.00015.14
7.2.330.0120.00616.86
7.2.320.0130.00316.84
7.2.310.0050.01216.49
7.2.300.0090.00616.57
7.2.290.0130.00316.70
7.1.200.0030.00915.59
7.1.70.0070.00717.37
7.1.60.0130.00717.37
7.1.50.0040.01816.69
7.1.00.0000.08022.51
7.0.200.0030.01416.93
7.0.140.0030.07322.04
7.0.80.0030.06719.97
7.0.70.0130.07020.01
7.0.60.0100.08319.88
7.0.50.0270.04020.33
7.0.40.0000.09020.19
7.0.30.0100.08720.15
7.0.20.0000.08320.14
7.0.10.0030.04320.03
7.0.00.0170.03720.07
5.6.280.0030.07320.81
5.6.230.0070.04320.63
5.6.220.0070.07720.62
5.6.210.0170.06020.57
5.6.200.0000.08720.97
5.6.190.0170.07321.11
5.6.180.0100.03021.05
5.6.170.0130.06020.96
5.6.160.0030.03721.03
5.6.150.0030.04321.05
5.6.140.0030.08721.00
5.6.130.0070.05721.16
5.6.120.0030.08721.01
5.6.110.0070.08321.00
5.6.100.0100.07321.06
5.6.90.0000.05320.97
5.6.80.0030.04320.34
5.6.70.0000.05020.43
5.6.60.0100.03320.48
5.6.50.0070.08020.41
5.6.40.0070.06720.40
5.6.30.0000.08320.44
5.6.20.0130.06720.32
5.6.10.0000.04320.35
5.6.00.0030.05020.28
5.5.370.0030.07720.36
5.5.360.0070.08020.54
5.5.350.0000.08720.43
5.5.340.0100.07320.89
5.5.330.0000.05720.87
5.5.320.0070.08320.92
5.5.310.0100.07320.91
5.5.300.0030.08020.80
5.5.290.0000.07320.84
5.5.280.0100.07320.73
5.5.270.0070.06320.63
5.5.260.0130.03720.83
5.5.250.0030.04320.46
5.5.240.0130.05720.32
5.5.230.0070.08320.28
5.5.220.0170.06020.18
5.5.210.0030.06020.21
5.5.200.0030.04720.17
5.5.190.0030.04720.27
5.5.180.0070.07720.14
5.5.160.0070.04020.24
5.5.150.0030.04020.19
5.5.140.0130.07320.14
5.5.130.0070.04720.25
5.5.120.0000.05720.21
5.5.110.0070.05320.23
5.5.100.0030.04320.03
5.5.90.0100.07020.10
5.5.80.0100.02720.09
5.5.70.0030.04020.16
5.5.60.0030.08019.90
5.5.50.0000.07720.09
5.5.40.0070.06720.15
5.5.30.0070.05320.05
5.5.20.0130.06320.13
5.5.10.0070.07719.97
5.5.00.0070.08020.17
5.4.450.0100.08019.55
5.4.440.0130.06319.35
5.4.430.0070.07719.53
5.4.420.0100.03719.37
5.4.410.0070.04019.41
5.4.400.0070.08319.24
5.4.390.0070.05019.10
5.4.380.0030.05019.13
5.4.370.0030.07019.23
5.4.360.0030.04319.16
5.4.350.0030.05319.16
5.4.340.0030.07718.95
5.4.320.0170.06319.16
5.4.310.0100.06319.14
5.4.300.0030.07719.14
5.4.290.0100.04319.12
5.4.280.0030.06718.89
5.4.270.0100.07018.84
5.4.260.0170.07019.01
5.4.250.0070.07019.17
5.4.240.0030.03319.04
5.4.230.0170.05718.82
5.4.220.0070.07318.89
5.4.210.0100.07319.07
5.4.200.0070.06018.86
5.4.190.0030.05319.04
5.4.180.0000.04318.89
5.4.170.0100.07318.89
5.4.160.0100.03719.10
5.4.150.0170.06319.01
5.4.140.0100.07016.50
5.4.130.0070.03316.38
5.4.120.0000.04016.51
5.4.110.0030.04016.43
5.4.100.0070.06016.54
5.4.90.0130.06016.52
5.4.80.0130.04716.38
5.4.70.0030.03316.54
5.4.60.0030.03016.31
5.4.50.0000.06016.25
5.4.40.0070.03016.54
5.4.30.0070.07316.33
5.4.20.0070.07016.46
5.4.10.0070.06716.38
5.4.00.0000.07315.90
5.3.290.0070.08314.81
5.3.280.0170.06314.70
5.3.270.0100.07314.54
5.3.260.0000.07714.62
5.3.250.0070.04714.54
5.3.240.0070.03714.71
5.3.230.0100.07014.62
5.3.220.0030.06314.66
5.3.210.0000.04314.59
5.3.200.0070.03314.63
5.3.190.0070.07014.70
5.3.180.0100.04014.70
5.3.170.0100.06714.67
5.3.160.0070.04014.68
5.3.150.0000.04714.68
5.3.140.0130.06714.63
5.3.130.0100.06314.61
5.3.120.0100.07714.57
5.3.110.0070.07714.48
5.3.100.0130.02314.06
5.3.90.0030.06314.04
5.3.80.0030.07714.14
5.3.70.0030.08013.93
5.3.60.0130.06714.06
5.3.50.0000.07713.98
5.3.40.0100.06713.96
5.3.30.0130.06013.91
5.3.20.0030.07013.70
5.3.10.0100.05013.75
5.3.00.0130.04313.62
5.2.170.0000.06711.61
5.2.160.0070.05011.61
5.2.150.0070.05711.61
5.2.140.0100.05311.61
5.2.130.0100.05311.61
5.2.120.0070.05311.61
5.2.110.0030.05011.61
5.2.100.0030.03011.61
5.2.90.0070.05311.61
5.2.80.0030.06011.61
5.2.70.0070.06011.61
5.2.60.0030.04311.61
5.2.50.0000.03711.61
5.2.40.0100.05711.61
5.2.30.0030.06311.61
5.2.20.0070.03311.61
5.2.10.0100.05711.61
5.2.00.0070.04011.61
5.1.60.0100.03311.61
5.1.50.0000.04711.61
5.1.40.0030.02711.61
5.1.30.0130.01011.61
5.1.20.0030.05011.61
5.1.10.0130.05011.61
5.1.00.0070.04311.61
5.0.50.0000.03711.61
5.0.40.0000.04711.61
5.0.30.0000.02711.61
5.0.20.0030.01311.61
5.0.10.0000.01711.61
5.0.00.0030.06011.61
4.4.90.0000.02311.61
4.4.80.0000.02711.61
4.4.70.0030.03711.61
4.4.60.0000.03311.61
4.4.50.0000.01311.61
4.4.40.0030.02011.61
4.4.30.0030.03311.61
4.4.20.0030.01311.61
4.4.10.0030.01011.61
4.4.00.0000.02311.61
4.3.110.0000.02311.61
4.3.100.0000.01311.61
4.3.90.0000.01311.61
4.3.80.0070.01711.61
4.3.70.0030.03311.61
4.3.60.0000.02311.61
4.3.50.0030.03711.61
4.3.40.0000.04311.61
4.3.30.0000.01311.61
4.3.20.0030.01011.61
4.3.10.0000.03311.61
4.3.00.0030.03011.61

preferences:
47.23 ms | 401 KiB | 5 Q