3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('America/Los_Angeles'); class Test { public $previous, $next = NULL; public function __clone() { $this->previous != NULL ? $this->previous = clone $this->previous : $this->previous = NULL; $this->next != NULL ? $this->next = clone $this->next : $this->next = NULL; } public function __toString() { return '[' . ($this->previous != NULL ? '<' : '-') . ' ' . ($this->next != NULL ? '>' : '-') . ']'; } } // Create some test objects $a = new Test(); $b = new Test(); // Link them together $a->next =& $b; $b->previous =& $a; // Clone and print echo "a before cloning:\na: " . $a . "\n"; $b = clone $a; echo "These two should not look the same:\na: " . $a . "\nb: " . $clone . "\n"; // Expected result: // ---------------- // a before cloning: // a: [- >] // These two should not look the same: // a: [- >] // b: [- -] // // // Actual result: // -------------- // a before cloning: // a: [- >] // Segmentation fault

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.70.0290.01134.00
8.3.60.0300.01533.75
8.3.50.0270.02034.03
8.3.40.0440.00635.88
8.3.30.0220.01836.22
8.3.20.0160.00437.34
8.3.10.0090.00939.60
8.3.00.0220.01034.88
8.2.180.0230.01329.00
8.2.170.0210.00731.00
8.2.160.0200.01032.69
8.2.150.0120.00331.47
8.2.140.0090.00632.63
8.2.130.0100.00334.28
8.2.120.0100.00334.22
8.2.110.0130.00334.22
8.2.100.0200.00330.09
8.2.90.0080.00831.33
8.2.80.0150.00030.18
8.2.70.0130.01029.75
8.2.60.0070.01030.18
8.2.50.0090.00629.75
8.2.40.0120.00430.53
8.2.30.0040.00830.39
8.2.20.0090.00330.09
8.2.10.0090.00330.57
8.2.00.0130.00730.07
8.1.280.0220.00930.09
8.1.270.0150.00734.64
8.1.260.0130.00331.37
8.1.250.0130.00334.69
8.1.240.0060.00935.85
8.1.230.0280.00331.50
8.1.220.0120.00430.28
8.1.210.0110.00429.86
8.1.200.0140.00329.88
8.1.190.0070.00730.02
8.1.180.0060.00929.73
8.1.170.0090.00631.09
8.1.160.0080.00634.60
8.1.150.0100.00331.35
8.1.140.0040.00930.02
8.1.130.0080.00430.31
8.1.120.0090.00330.17
8.1.110.0060.00630.08
8.1.100.0040.00830.01
8.1.90.0100.00330.07
8.1.80.0030.00930.07
8.1.70.0120.00030.07
8.1.60.0100.00630.15
8.1.50.0070.00730.11
8.1.40.0060.00630.00
8.1.30.0110.00330.14
8.1.20.0060.00630.11
8.1.10.0030.01030.16
8.1.00.0100.00329.95
8.0.300.0150.00029.22
8.0.290.0100.00329.04
8.0.280.0040.00930.43
8.0.270.0090.00329.24
8.0.260.0110.00029.16
8.0.250.0080.00428.99
8.0.240.0190.00028.85
8.0.230.0090.00328.84
8.0.220.0060.00628.93
8.0.210.0110.00028.79
8.0.200.0080.00428.87
8.0.190.0110.00328.75
8.0.180.0070.00728.93
8.0.170.0100.00328.92
8.0.160.0030.01028.87
8.0.150.0100.00428.91
8.0.140.0100.00328.84
8.0.130.0100.00725.30
8.0.120.0090.00428.86
8.0.110.0070.00728.91
8.0.100.0050.00828.79
8.0.90.0060.00628.82
8.0.80.0120.01528.86
8.0.70.0000.01328.80
8.0.60.0080.00528.84
8.0.50.0030.01028.79
8.0.30.0180.01828.90
8.0.20.0250.01628.97
8.0.10.0080.00428.87
8.0.00.0180.01428.91
7.4.330.0090.00425.84
7.4.320.0090.00328.97
7.4.300.0030.01028.99
7.4.290.0110.00828.84
7.4.280.0070.01028.93
7.4.270.0080.00429.02
7.4.260.0130.00028.90
7.4.250.0100.00328.98
7.4.240.0090.00328.99
7.4.230.0080.00428.95
7.4.220.0260.01028.86
7.4.210.0180.01328.96
7.4.200.0090.00329.11
7.4.190.0060.00629.03
7.4.160.0280.00429.16
7.4.150.0250.00928.97
7.4.140.0210.01329.06
7.4.130.0220.01229.12
7.4.120.0210.01528.93
7.4.110.0220.01029.10
7.4.100.0130.02429.07
7.4.90.0090.02829.16
7.4.80.0290.01028.84
7.4.70.0190.01329.03
7.4.60.0210.01729.08
7.4.50.0090.00629.04
7.4.40.0200.00728.75
7.4.30.0160.01629.12
7.4.10.0180.01127.16
7.4.00.0130.01527.53
7.3.330.0040.00825.95
7.3.320.0040.00725.71
7.3.310.0140.00028.70
7.3.300.0100.00328.74
7.3.290.0220.01928.91
7.3.280.0240.01528.86
7.3.270.0190.01329.10
7.3.260.0230.01029.02
7.3.250.0300.01528.94
7.3.240.0150.01528.93
7.3.230.0190.01329.27
7.3.210.0220.01129.02
7.3.200.0230.01529.04
7.3.190.0260.01029.02
7.3.180.0270.01729.16
7.3.170.0300.01029.04
7.3.160.0250.00628.98
7.3.130.0120.01627.43
7.3.120.0160.01027.40
7.3.110.0130.01326.98
7.3.100.0210.00027.46
7.3.90.0110.00827.69
7.3.80.0100.01027.22
7.3.70.0120.00927.52
7.3.60.0090.01027.44
7.3.50.0050.01527.06
7.3.40.0060.01527.45
7.3.30.0100.00727.45
7.3.20.0040.01428.63
7.3.10.0140.00928.66
7.3.00.0170.00828.65
7.2.330.0220.01528.07
7.2.320.0190.01328.13
7.2.310.0240.00628.10
7.2.300.0180.02128.28
7.2.290.0190.01327.98
7.2.260.0170.01226.86
7.2.250.0080.01526.71
7.2.240.0140.01126.62
7.2.230.0110.00926.84
7.2.220.0070.01126.86
7.2.210.0090.01126.51
7.2.200.0090.01026.64
7.2.190.0170.00426.49
7.2.180.0100.01026.13
7.2.170.0090.01026.73
7.2.160.0090.00926.55
7.2.150.0110.00728.68
7.2.140.0060.01228.76
7.2.130.0150.00628.91
7.2.120.0180.01128.95
7.2.110.0180.00528.81
7.2.100.0160.00728.86
7.2.90.0210.01028.92
7.2.80.0150.01228.81
7.2.70.0170.01029.07
7.2.60.0220.00828.90
7.2.50.0190.00828.85
7.2.40.0170.00728.83
7.2.30.0180.00928.79
7.2.20.0230.01028.48
7.2.10.0170.01028.64
7.2.00.0110.01029.08
7.1.330.0110.00427.86
7.1.320.0110.00727.82
7.1.310.0130.00527.74
7.1.300.0160.00327.88
7.1.290.0030.01627.76
7.1.280.0090.00927.70
7.1.270.0090.00927.55
7.1.260.0090.00927.50
7.1.250.0150.01127.63
7.1.240.0110.00627.82
7.1.230.0110.00727.70
7.1.220.0120.00627.46
7.1.210.0150.00327.68
7.1.200.0070.01127.64
7.1.190.0160.00327.79
7.1.180.0110.00827.66
7.1.170.0080.00827.86
7.1.160.0060.01227.57
7.1.150.0090.00627.37
7.1.140.0070.01127.59
7.1.130.0120.00627.68
7.1.120.0100.00827.59
7.1.110.0090.00927.63
7.1.100.0430.00527.93
7.1.90.0080.00827.80
7.1.80.0140.00627.79
7.1.70.0100.00728.43
7.1.60.0110.01328.31
7.1.50.0090.01328.45
7.1.40.0100.00727.80
7.1.30.0070.01127.90
7.1.20.0040.01427.42
7.1.10.0120.00327.84
7.1.00.0120.04230.96
7.0.330.0050.01327.68
7.0.320.0150.00327.48
7.0.310.0110.00727.38
7.0.300.0130.00727.61
7.0.290.0070.01127.48
7.0.280.0110.00427.47
7.0.270.0090.00927.43
7.0.260.0110.00727.50
7.0.250.0060.01027.41
7.0.240.0060.01427.43
7.0.230.0070.01027.37
7.0.220.0090.00927.70
7.0.210.0030.01527.34
7.0.200.0080.01027.50
7.0.190.0120.00627.32
7.0.180.0120.00627.45
7.0.170.0120.00627.59
7.0.160.0080.00927.28
7.0.150.0060.01227.55
7.0.140.0080.04230.87
7.0.130.0080.00827.64
7.0.120.0110.00627.45
7.0.110.0080.01027.56
7.0.100.0180.03930.00
7.0.90.0140.04029.85
7.0.80.0080.04829.74
7.0.70.0110.04129.94
7.0.60.0130.02529.93
7.0.50.0100.04330.09
7.0.40.0030.02924.69
7.0.30.0150.03924.85
7.0.20.0090.04724.76
7.0.10.0060.04824.82
7.0.00.0130.04524.82
5.6.400.0170.00729.79
5.6.390.0160.00929.48
5.6.380.0140.01129.89
5.6.370.0080.01629.53
5.6.360.0080.01729.95
5.6.350.0090.01629.88
5.6.340.0160.01029.85
5.6.330.0100.01629.80
5.6.320.0140.00730.06
5.6.310.0150.00929.77
5.6.300.0160.01129.62
5.6.290.0100.01429.73
5.6.280.0100.04633.18
5.6.270.0130.01429.71
5.6.260.0120.01329.91
5.6.250.0150.04032.95
5.6.240.0110.04632.90
5.6.230.0120.05132.97
5.6.220.0140.04332.83
5.6.210.0160.03332.88
5.6.200.0100.04633.02
5.6.190.0140.04033.14
5.6.180.0170.04033.03
5.6.170.0130.04532.98
5.6.160.0120.04733.23
5.6.150.0230.03533.08
5.6.140.0130.04033.14
5.6.130.0100.05133.27
5.6.120.0160.02233.19
5.6.110.0110.04833.17
5.6.100.0140.03333.29
5.6.90.0170.05033.05
5.6.80.0210.04032.62
5.6.70.0150.04532.63
5.6.60.0150.04232.72
5.6.50.0120.04232.65
5.6.40.0240.03932.77
5.6.30.0100.03232.79
5.6.20.0220.04032.77
5.6.10.0190.04332.77
5.6.00.0170.02932.72
5.5.380.0080.05132.61
5.5.370.0170.04132.69
5.5.360.0070.03832.71
5.5.350.0090.02832.71
5.5.340.0130.04632.82
5.5.330.0090.04132.90
5.5.320.0050.05433.02
5.5.310.0050.03132.87
5.5.300.0210.04232.97
5.5.290.0170.04533.03
5.5.280.0080.03033.10
5.5.270.0190.04232.85
5.5.260.0140.02933.05
5.5.250.0160.04332.80
5.5.240.0140.03032.53
5.5.230.0110.05032.49
5.5.220.0110.04832.54
5.5.210.0100.05232.58
5.5.200.0190.03632.70
5.5.190.0150.02932.52
5.5.180.0100.05032.66
5.5.170.0180.00629.74
5.5.160.0150.02832.46
5.5.150.0170.04232.57
5.5.140.0140.04932.70
5.5.130.0150.04732.55
5.5.120.0110.03732.51
5.5.110.0120.03732.46
5.5.100.0150.04832.52
5.5.90.0120.02932.55
5.5.80.0130.03432.55
5.5.70.0160.03332.53
5.5.60.0150.02032.58
5.5.50.0160.05032.31
5.5.40.0160.02432.58
5.5.30.0140.02332.36
5.5.20.0140.04332.48
5.5.10.0120.02332.54
5.5.00.0140.02832.56
5.4.450.0090.04830.95
5.4.440.0100.04630.85
5.4.430.0100.03730.84
5.4.420.0120.05430.90
5.4.410.0180.04130.96
5.4.400.0100.02730.65
5.4.390.0080.04530.73
5.4.380.0130.04130.64
5.4.370.0090.02930.57
5.4.360.0110.04430.77
5.4.350.0110.02830.70
5.4.340.0120.02630.72
5.4.330.0170.00626.66
5.4.320.0110.02830.88
5.4.310.0180.03730.86
5.4.300.0130.03130.78
5.4.290.0130.04530.64
5.4.280.0130.03330.70
5.4.270.0130.04630.78
5.4.260.0110.04730.69
5.4.250.0120.03930.70
5.4.240.0170.04630.70
5.4.230.0100.04830.89
5.4.220.0110.03330.64
5.4.210.0130.04630.84
5.4.200.0150.04230.69
5.4.190.0100.03130.79
5.4.180.0130.02630.75
5.4.170.0120.04230.64
5.4.160.0190.03830.66
5.4.150.0140.03930.81
5.4.140.0150.04329.41
5.4.130.0120.04729.31
5.4.120.0080.04629.38
5.4.110.0170.03529.40
5.4.100.0080.02629.51
5.4.90.0080.03029.41
5.4.80.0100.02529.39
5.4.70.0090.02929.41
5.4.60.0070.02929.33
5.4.50.0090.02529.49
5.4.40.0100.02829.43
5.4.30.0110.02429.48
5.4.20.0050.03029.30
5.4.10.0090.02729.55
5.4.00.0070.03429.14
5.3.290.0110.03432.55
5.3.280.0170.03132.17
5.3.270.0150.04832.15
5.3.260.0150.05332.20
5.3.250.0120.03932.10
5.3.240.0160.04632.19
5.3.230.0150.04732.16
5.3.220.0130.05531.63
5.3.210.0150.04331.66
5.3.200.0080.03631.62
5.3.190.0130.02831.55
5.3.180.0120.02931.64
5.3.170.0140.02531.72
5.3.160.0130.02831.72
5.3.150.0130.02631.54
5.3.140.0110.02831.70
5.3.130.0140.03131.62
5.3.120.0110.03631.64
5.3.110.0080.03231.67
5.3.100.0130.02231.32
5.3.90.0080.02831.64
5.3.80.0120.02930.94
5.3.70.0140.02331.11
5.3.60.0170.02231.17
5.3.50.0070.04731.07
5.3.40.0140.02331.10
5.3.30.0080.02731.13
5.3.20.0180.02630.97
5.3.10.0080.02730.83
5.3.00.0090.03131.29
5.2.170.0070.03722.68
5.2.160.0030.03322.58
5.2.150.0100.03022.78
5.2.140.0000.03722.74
5.2.130.0100.02722.68
5.2.120.0000.03722.70
5.2.110.0030.03722.66
5.2.100.0100.02722.63
5.2.90.0100.03022.86
5.2.80.0070.03022.69
5.2.70.0030.03322.70
5.2.60.0130.02322.66
5.2.50.0100.03022.63
5.2.40.0200.02022.67
5.2.30.0030.03722.72
5.2.20.0070.03022.68
5.2.10.0070.03022.52
5.2.00.0030.03722.47
5.1.60.0030.03022.51
5.1.50.0030.03022.68
5.1.40.0100.02022.62
5.1.30.0100.02722.89
5.1.20.0130.02022.47
5.1.10.0130.02022.32
5.1.00.0000.02710.10
5.0.50.0000.0238.57
5.0.40.0030.0178.41
5.0.30.0000.0308.35
5.0.20.0000.0208.27
5.0.10.0000.0208.16
5.0.00.0030.0278.23
4.4.90.0000.0178.16
4.4.80.0070.0108.16
4.4.70.0030.0138.16
4.4.60.0000.0178.16
4.4.50.0000.0178.16
4.4.40.0030.0208.16
4.4.30.0030.0138.16
4.4.20.0000.0178.16
4.4.10.0000.0138.16
4.4.00.0030.0238.16
4.3.110.0030.0138.16
4.3.100.0000.0138.16
4.3.90.0000.0138.16
4.3.80.0000.0408.16
4.3.70.0000.0138.16
4.3.60.0000.0178.16
4.3.50.0000.0138.16
4.3.40.0000.0208.16
4.3.30.0030.0138.16
4.3.20.0070.0108.16
4.3.10.0030.0108.16
4.3.00.0000.0138.16

preferences:
64.93 ms | 401 KiB | 5 Q