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); $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.70.0120.00316.38
8.3.60.0060.00916.75
8.3.50.0150.00321.99
8.3.40.0070.01018.81
8.3.30.0120.00319.21
8.3.20.0080.00020.34
8.3.10.0050.00323.66
8.3.00.0060.00319.38
8.2.190.0120.00918.25
8.2.180.0070.00716.75
8.2.170.0070.00722.96
8.2.160.0140.00318.77
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0040.00422.08
8.2.110.0050.00322.11
8.2.100.0090.00317.90
8.2.90.0000.00719.22
8.2.80.0030.00617.97
8.2.70.0050.00517.63
8.2.60.0030.00617.80
8.2.50.0050.00318.07
8.2.40.0080.00019.89
8.2.30.0000.00718.04
8.2.20.0040.00417.83
8.2.10.0000.00718.16
8.2.00.0030.00717.59
8.1.280.0070.01025.92
8.1.270.0080.00023.88
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0030.00623.79
8.1.230.0090.00319.12
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0000.00817.52
8.1.180.0000.01019.13
8.1.170.0040.00418.59
8.1.160.0040.00422.10
8.1.150.0040.00418.63
8.1.140.0040.00417.50
8.1.130.0040.00417.85
8.1.120.0000.00717.40
8.1.110.0000.00917.50
8.1.100.0040.00417.49
8.1.90.0070.00017.47
8.1.80.0000.00717.40
8.1.70.0070.00017.47
8.1.60.0080.00017.61
8.1.50.0040.00417.54
8.1.40.0030.00517.61
8.1.30.0000.00817.65
8.1.20.0040.00417.70
8.1.10.0000.00717.48
8.1.00.0000.00917.56
8.0.300.0000.00820.63
8.0.290.0050.00317.18
8.0.280.0040.00418.52
8.0.270.0030.00317.36
8.0.260.0000.00617.30
8.0.250.0030.00317.07
8.0.240.0060.00317.06
8.0.230.0070.00016.88
8.0.220.0030.00316.94
8.0.210.0040.00416.97
8.0.200.0030.00317.04
8.0.190.0030.00517.11
8.0.180.0040.00417.03
8.0.170.0030.00617.00
8.0.160.0000.00717.06
8.0.150.0000.00716.96
8.0.140.0000.00717.00
8.0.130.0050.00013.42
8.0.120.0000.00816.93
8.0.110.0070.00016.95
8.0.100.0000.00816.88
8.0.90.0000.00816.94
8.0.80.0040.01216.98
8.0.70.0000.00717.00
8.0.60.0040.00416.89
8.0.50.0000.00716.79
8.0.30.0140.01117.09
8.0.20.0150.00617.40
8.0.10.0040.00417.05
8.0.00.0090.01116.97
7.4.330.0050.00015.13
7.4.320.0000.00616.54
7.4.300.0000.00816.49
7.4.290.0030.00316.56
7.4.280.0000.00716.39
7.4.270.0050.00216.65
7.4.260.0040.00316.63
7.4.250.0040.00416.64
7.4.240.0020.00516.49
7.4.230.0000.00716.45
7.4.220.0130.00316.74
7.4.210.0100.00816.52
7.4.200.0000.00716.65
7.4.190.0000.00716.63
7.4.160.0040.01416.61
7.4.150.0100.01017.40
7.4.140.0100.00817.86
7.4.130.0110.00616.51
7.4.120.0070.01016.59
7.4.110.0210.00416.50
7.4.100.0180.00016.50
7.4.90.0070.01116.67
7.4.80.0100.01419.39
7.4.70.0110.00616.60
7.4.60.0040.01816.59
7.4.50.0060.00316.60
7.4.40.0060.00922.77
7.4.30.0130.00416.59
7.4.00.0000.01414.93
7.3.330.0000.00713.34
7.3.320.0050.00013.15
7.3.310.0000.00816.20
7.3.300.0040.00416.41
7.3.290.0070.00716.30
7.3.280.0080.00916.33
7.3.270.0070.01117.40
7.3.260.0140.00616.61
7.3.250.0070.01416.61
7.3.240.0120.00616.36
7.3.230.0150.00916.42
7.3.210.0150.00916.50
7.3.200.0060.01319.39
7.3.190.0070.01516.51
7.3.180.0070.01016.64
7.3.170.0040.01216.45
7.3.160.0100.00616.46
7.3.120.0160.00014.98
7.3.10.0070.00616.63
7.3.00.0020.01016.71
7.2.330.0060.01316.46
7.2.320.0060.01216.41
7.2.310.0100.01516.80
7.2.300.0110.00616.84
7.2.290.0090.00916.38
7.2.130.0020.01116.91
7.2.120.0070.00616.92
7.2.110.0030.01216.83
7.2.100.0030.00917.06
7.2.90.0060.01116.80
7.2.80.0070.00717.00
7.2.70.0060.00816.83
7.2.60.0050.01016.93
7.2.50.0020.01217.13
7.2.40.0030.01216.84
7.2.30.0050.00816.96
7.2.20.0090.00517.04
7.2.10.0050.01016.86
7.2.00.0090.00317.77
7.1.250.0030.00815.81
7.1.200.0000.01315.86
7.1.100.0060.00617.96
7.1.70.0000.00816.95
7.1.60.0070.01419.46
7.1.50.0070.00416.94
7.1.00.0000.08022.44
7.0.200.0150.00314.84
7.0.140.0030.07022.00
7.0.60.0130.07319.82
7.0.50.0030.06017.85
7.0.40.0030.07320.15
7.0.30.0200.04720.07
7.0.20.0330.05020.10
7.0.10.0070.08320.05
7.0.00.0030.04020.07
5.6.280.0000.07721.05
5.6.210.0000.05720.72
5.6.200.0030.04318.20
5.6.190.0070.08020.41
5.6.180.0270.06320.52
5.6.170.0230.08020.47
5.6.160.0000.05320.71
5.6.150.0030.08318.16
5.6.140.0030.05318.25
5.6.130.0030.04018.28
5.6.120.0030.06720.90
5.6.110.0100.07321.00
5.6.100.0070.08021.09
5.6.90.0070.05720.97
5.6.80.0130.07320.38
5.6.70.3130.04320.38
5.5.350.0130.08020.45
5.5.340.0100.07318.04
5.5.330.0070.05320.27
5.5.320.0070.07320.35
5.5.310.0170.04020.56
5.5.300.0070.08017.98
5.5.290.0070.03717.98
5.5.280.0000.05020.78
5.5.270.0100.07020.84
5.5.260.0130.08020.87
5.5.250.0030.08720.69
5.5.240.0270.07020.27
5.4.450.0100.05719.48
5.4.440.0630.05719.39
5.4.430.1000.05319.61
5.4.420.0630.00019.53
5.4.410.0100.06019.00
5.4.400.0170.05318.79
5.4.390.0130.05718.74
5.4.380.0300.04718.52
5.4.370.0270.04018.61
5.4.360.0070.06018.74
5.4.350.0060.03712.04
5.4.340.0100.03912.03
5.4.320.0070.04612.51
5.4.310.0060.03812.51
5.4.300.0090.03712.51
5.4.290.0080.05212.50
5.4.280.0130.04612.39
5.4.270.0120.04712.39
5.4.260.0120.05712.39
5.4.250.0080.04012.39
5.4.240.0090.04812.39
5.4.230.0040.04012.38
5.4.220.0100.03712.38
5.4.210.0060.03712.38
5.4.200.0070.05512.38
5.4.190.0060.03712.38
5.4.180.0100.03612.38
5.4.170.0070.03812.39
5.4.160.0060.03712.38
5.4.150.0050.03912.38
5.4.140.0080.04312.06
5.4.130.0080.04112.05
5.4.120.0110.04912.01
5.4.110.0090.05112.01
5.4.100.0100.03612.00
5.4.90.0110.03812.00
5.4.80.0100.04412.01
5.4.70.0130.03112.00
5.4.60.0100.03412.00
5.4.50.0070.03812.00
5.4.40.0060.04511.98
5.4.30.0090.03711.99
5.4.20.0060.04711.98
5.4.10.0130.04811.98
5.4.00.0050.06111.48
5.3.290.0070.04112.80
5.3.280.0090.04112.71
5.3.270.0070.05712.73
5.3.260.0070.05812.72
5.3.250.0100.05312.72
5.3.240.0140.05012.72
5.3.230.0110.06112.71
5.3.220.0130.05212.68
5.3.210.0110.06112.68
5.3.200.0190.04512.68
5.3.190.0090.05012.68
5.3.180.0100.05412.68
5.3.170.0110.05812.67
5.3.160.0130.06512.68
5.3.150.0090.03912.68
5.3.140.0160.05012.66
5.3.130.0050.04312.66
5.3.120.0070.04212.66
5.3.110.0070.04912.66
5.3.100.0070.04112.13
5.3.90.0100.04212.11
5.3.80.0120.04912.10
5.3.70.0100.04812.10
5.3.60.0080.05512.09
5.3.50.0120.05212.04
5.3.40.0100.04812.03
5.3.30.0050.05112.00
5.3.20.0130.05011.77
5.3.10.0070.04611.74
5.3.00.0050.03811.72
5.2.170.0040.0349.23
5.2.160.0030.0319.23
5.2.150.0060.0329.23
5.2.140.0070.0349.23
5.2.130.0110.0419.18
5.2.120.0080.0369.19
5.2.110.0090.0299.20
5.2.100.0080.0289.19
5.2.90.0060.0339.20
5.2.80.0070.0339.19
5.2.70.0210.0429.19
5.2.60.0080.0349.13
5.2.50.0060.0379.10
5.2.40.0040.0449.08
5.2.30.0120.0319.06
5.2.20.0040.0349.05
5.2.10.0060.0328.96
5.2.00.0060.0338.82
5.1.60.0190.0588.10
5.1.50.0030.0318.09
5.1.40.0090.0238.08
5.1.30.0170.0338.43
5.1.20.0050.0318.45
5.1.10.0060.0328.17
5.1.00.0060.0308.17
5.0.50.0060.0226.66
5.0.40.0040.0216.51
5.0.30.0060.0326.33
5.0.20.0060.0206.29
5.0.10.0060.0226.27
5.0.00.0050.0316.26
4.4.90.0020.0184.78
4.4.80.0060.0154.75
4.4.70.0070.0154.75
4.4.60.0050.0184.75
4.4.50.0070.0334.77
4.4.40.0030.0434.71
4.4.30.0070.0204.76
4.4.20.0060.0234.84
4.4.10.0050.0204.85
4.4.00.0130.0544.76
4.3.110.0060.0254.67
4.3.100.0090.0284.66
4.3.90.0100.0424.64
4.3.80.0120.0474.58
4.3.70.0090.0384.63
4.3.60.0090.0194.63
4.3.50.0070.0254.63
4.3.40.0180.0554.54
4.3.30.0100.0493.30
4.3.20.0130.0323.28
4.3.10.0030.0223.23
4.3.00.0130.0208.14

preferences:
52.52 ms | 401 KiB | 5 Q