3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { public $value; function __construct($value){ $this->value = $value; } function __wakeup() { if($this->value instanceof C) $this->value = C::$instance; } } class C { static public $instance; } C::$instance = new C; $A = array( new B(C::$instance), new B(C::$instance), new B(C::$instance) ); var_dump($A); var_dump($A); $A = unserialize(serialize($A)); var_dump($A);

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.0110.00418.28
8.3.50.0150.01122.11
8.3.40.0130.00718.84
8.3.30.0100.00619.22
8.3.20.0140.00420.33
8.3.10.0040.00423.64
8.3.00.0090.00019.38
8.2.180.0060.00918.13
8.2.170.0120.00322.96
8.2.160.0070.00720.36
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0080.00019.20
8.2.110.0030.00722.31
8.2.100.0060.00617.78
8.2.90.0040.00419.30
8.2.80.0000.00817.97
8.2.70.0030.00717.50
8.2.60.0060.00617.78
8.2.50.0040.00418.07
8.2.40.0040.00419.95
8.2.30.0000.00818.11
8.2.20.0000.00817.64
8.2.10.0040.00418.00
8.2.00.0080.00517.59
8.1.280.0100.01025.92
8.1.270.0060.00323.84
8.1.260.0090.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00023.96
8.1.230.0080.00419.16
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0000.00817.43
8.1.180.0090.00018.10
8.1.170.0030.00618.50
8.1.160.0040.00422.04
8.1.150.0000.00818.68
8.1.140.0030.00517.47
8.1.130.0000.00719.23
8.1.120.0050.00317.54
8.1.110.0050.00217.38
8.1.100.0000.00917.55
8.1.90.0000.00817.39
8.1.80.0040.00417.57
8.1.70.0000.00917.40
8.1.60.0110.00517.57
8.1.50.0000.00817.37
8.1.40.0080.00017.45
8.1.30.0040.00417.67
8.1.20.0050.00317.64
8.1.10.0030.00617.59
8.1.00.0000.00817.48
8.0.300.0040.00420.71
8.0.290.0060.00317.05
8.0.280.0000.00718.47
8.0.270.0000.00717.22
8.0.260.0000.00816.91
8.0.250.0040.00416.94
8.0.240.0000.00817.03
8.0.230.0000.00716.94
8.0.220.0000.00717.02
8.0.210.0040.00417.01
8.0.200.0000.00717.07
8.0.190.0000.00717.06
8.0.180.0070.00017.01
8.0.170.0160.00316.99
8.0.160.0000.00817.00
8.0.150.0040.00416.84
8.0.140.0000.00716.86
8.0.130.0070.00013.41
8.0.120.0050.00316.98
8.0.110.0000.00816.97
8.0.100.0040.00416.94
8.0.90.0000.00716.79
8.0.80.0080.00716.98
8.0.70.0050.00316.98
8.0.60.0040.00416.93
8.0.50.0030.00616.89
8.0.30.0080.01217.25
8.0.20.0100.01017.40
8.0.10.0000.00717.09
8.0.00.0140.00816.68
7.4.330.0000.00615.16
7.4.320.0040.00416.56
7.4.300.0030.00316.64
7.4.290.0020.00516.63
7.4.280.0050.00216.63
7.4.270.0050.00316.63
7.4.260.0070.00016.52
7.4.250.0080.00016.61
7.4.240.0060.00116.60
7.4.230.0040.00416.52
7.4.220.0300.00016.54
7.4.210.0070.01016.62
7.4.200.0070.00016.35
7.4.190.0000.00716.52
7.4.160.0080.00816.50
7.4.150.0150.00317.40
7.4.140.0140.00517.86
7.4.130.0100.00716.57
7.4.120.0120.00516.46
7.4.110.0110.00716.57
7.4.100.0100.00716.52
7.4.90.0100.00716.54
7.4.80.0110.01119.39
7.4.70.0120.00916.70
7.4.60.0120.00516.52
7.4.50.0030.00316.57
7.4.40.0030.00922.77
7.4.30.0080.01216.63
7.4.00.0050.01215.01
7.3.330.0030.00413.31
7.3.320.0060.00013.41
7.3.310.0040.00416.24
7.3.300.0030.00316.30
7.3.290.0100.00316.30
7.3.280.0070.01416.29
7.3.270.0100.00717.40
7.3.260.0040.01416.54
7.3.250.0140.00816.45
7.3.240.0140.00516.31
7.3.230.0120.00616.39
7.3.210.0060.01216.41
7.3.200.0160.00619.39
7.3.190.0070.01016.57
7.3.180.0130.00516.39
7.3.170.0130.00316.41
7.3.160.0100.01016.50
7.3.120.0050.01214.93
7.3.110.0000.01814.98
7.3.100.0070.01014.88
7.3.90.0110.00314.63
7.3.80.0040.01114.76
7.3.70.0000.00914.58
7.3.60.0030.01014.82
7.3.50.0100.00314.95
7.3.40.0100.00615.00
7.3.30.0060.00614.95
7.3.20.0120.00016.68
7.3.10.0070.01116.63
7.3.00.0100.00316.73
7.2.330.0130.00616.45
7.2.320.0080.00816.89
7.2.310.0070.01116.74
7.2.300.0140.00516.83
7.2.290.0140.00616.46
7.2.250.0080.01115.34
7.2.240.0030.01815.04
7.2.230.0030.01315.04
7.2.220.0100.00315.09
7.2.210.0130.00315.21
7.2.200.0060.00615.04
7.2.190.0090.00615.02
7.2.180.0030.01415.19
7.2.170.0030.00915.14
7.2.00.0030.00619.56
7.1.330.0030.01015.73
7.1.320.0030.01015.95
7.1.310.0060.00615.92
7.1.300.0030.00615.95
7.1.290.0100.00315.83
7.1.280.0030.00615.77
7.1.270.0070.00715.79
7.1.260.0000.00915.84
7.1.100.0030.01018.09
7.1.70.0060.00316.95
7.1.60.0130.01319.46
7.1.50.0240.01034.53
7.1.00.0000.08022.51
7.0.200.0170.00615.08
7.0.140.0100.06322.12
7.0.60.0100.07719.95
7.0.50.0070.04317.89
7.0.40.0070.04720.11
7.0.30.0270.05320.26
7.0.20.0170.08020.07
7.0.10.0230.07020.30
7.0.00.0070.08720.26
5.6.280.0100.06720.89
5.6.210.0100.05320.71
5.6.200.0130.03018.16
5.6.190.0030.04320.46
5.6.180.0070.08320.77
5.6.170.0530.06320.47
5.6.160.0070.05020.45
5.6.150.0030.05718.29
5.6.140.0100.06718.17
5.6.130.0030.04018.29
5.6.120.0070.03721.13
5.6.110.0030.05320.98
5.6.100.0130.06720.99
5.6.90.0100.06020.97
5.6.80.0030.07020.39
5.6.70.4670.04020.37
5.5.350.0230.04020.41
5.5.340.0030.05717.98
5.5.330.0030.09020.41
5.5.320.0300.06020.34
5.5.310.0270.06720.51
5.5.300.0030.05718.05
5.5.290.0030.04017.98
5.5.280.0030.09320.69
5.5.270.0130.04320.96
5.5.260.0130.07720.68
5.5.250.0030.06720.70
5.5.240.0370.04020.13
5.4.450.0430.08319.53
5.4.440.0330.06019.53
5.4.430.0630.06319.59
5.4.420.1130.05319.62
5.4.410.0770.05019.05
5.4.400.0370.05019.05
5.4.390.0200.05319.27
5.4.380.0630.05718.54
5.4.370.0300.05718.75
5.4.360.0470.06718.48
5.4.350.0300.05718.79
5.4.340.0300.06018.54
5.4.320.0040.03712.51
5.4.310.0080.03712.51
5.4.300.0070.04112.52
5.4.290.0100.04212.49
5.4.280.0040.04012.39
5.4.270.0050.04012.39
5.4.260.0070.05212.39
5.4.250.0080.05012.39
5.4.240.0160.04712.39
5.4.230.0100.04912.38
5.4.220.0100.05212.39
5.4.210.0120.05412.38
5.4.200.0070.05512.38
5.4.190.0080.05712.37
5.4.180.0150.04412.38
5.4.170.0080.05312.38
5.4.160.0100.04812.39
5.4.150.0100.04912.38
5.4.140.0070.05912.07
5.4.130.0110.04812.05
5.4.120.0100.04912.01
5.4.110.0120.05112.00
5.4.100.0100.05512.00
5.4.90.0080.04812.00
5.4.80.0080.04012.00
5.4.70.0400.09612.00
5.4.60.0140.04812.00
5.4.50.0130.04812.00
5.4.40.0100.03511.98
5.4.30.0030.04811.99
5.4.20.0150.05511.99
5.4.10.0110.05911.98
5.4.00.0090.05311.48
5.3.290.0080.04212.80
5.3.280.0120.05212.71
5.3.270.0110.06212.72
5.3.260.0220.05712.72
5.3.250.0150.04312.72
5.3.240.0170.04112.72
5.3.230.0080.03912.71
5.3.220.0080.03512.68
5.3.210.0110.04612.68
5.3.200.0210.06612.68
5.3.190.0190.06312.68
5.3.180.0090.05012.67
5.3.170.0090.04212.67
5.3.160.0100.03612.67
5.3.150.0100.04012.67
5.3.140.0060.04012.66
5.3.130.0120.03712.66
5.3.120.0050.06412.66
5.3.110.0080.04112.66
5.3.100.0120.05312.12
5.3.90.0090.05012.11
5.3.80.0070.04012.10
5.3.70.0070.04612.10
5.3.60.0080.03712.08
5.3.50.0060.05012.04
5.3.40.0090.05112.03
5.3.30.0110.05012.00
5.3.20.0180.04811.77
5.3.10.0140.04811.74
5.3.00.0110.05111.73
5.2.170.0040.0379.23
5.2.160.0050.0399.23
5.2.150.0100.0429.23
5.2.140.0140.0459.24
5.2.130.0050.0309.19
5.2.120.0070.0299.18
5.2.110.0050.0389.20
5.2.100.0100.0369.19
5.2.90.0080.0369.20
5.2.80.0080.0439.19
5.2.70.0070.0349.19
5.2.60.0080.0309.13
5.2.50.0070.0339.10
5.2.40.0050.0319.08
5.2.30.0090.0279.06
5.2.20.0040.0319.05
5.2.10.0080.0278.96
5.2.00.0050.0308.82
5.1.60.0050.0268.10
5.1.50.0080.0248.09
5.1.40.0070.0248.07
5.1.30.0060.0268.43
5.1.20.0040.0298.45
5.1.10.0040.0288.17
5.1.00.0070.0258.17
5.0.50.0030.0236.66
5.0.40.0090.0176.50
5.0.30.0080.0296.32
5.0.20.0050.0196.29
5.0.10.0030.0226.26
5.0.00.0020.0346.26
4.4.90.0050.0224.78
4.4.80.0050.0214.75
4.4.70.0050.0204.75
4.4.60.0040.0214.75
4.4.50.0030.0224.77
4.4.40.0060.0304.71
4.4.30.0030.0224.76
4.4.20.0070.0244.84
4.4.10.0040.0234.85
4.4.00.0050.0314.76
4.3.110.0070.0194.67
4.3.100.0040.0214.66
4.3.90.0060.0214.63
4.3.80.0070.0334.59
4.3.70.0040.0224.63
4.3.60.0040.0204.63
4.3.50.0060.0184.63
4.3.40.0050.0334.53
4.3.30.0010.0213.30
4.3.20.0020.0213.28
4.3.10.0030.0163.23
4.3.00.0230.01010.31

preferences:
55.23 ms | 401 KiB | 5 Q