3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public $inner = NULL; protected $prot = 1; private $priv = 2; } $one = new test; $two = new test; $one->inner = $two; $two->inner = $one; for($i = 100; $i > 0; $i--) { $serialized = preg_replace('/O:\d:"([^"]*)":/i', 'O:8:"stdClass":', serialize($one)); $storage = json_encode(unserialize(preg_replace_callback('/s:(\d+):"\x00([^"\x00]+)\x00([^"]+)"/i', function($matches) { return 's:'.($matches[1]-(strlen($matches[2])+2)).':"'.$matches[3].'"'; }, $serialized))); }

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.0040.01418.68
8.3.50.0130.01021.21
8.3.40.0040.01119.34
8.3.30.0120.00319.35
8.3.20.0000.00820.42
8.3.10.0080.00023.46
8.3.00.0040.00717.73
8.2.180.0150.00016.88
8.2.170.0040.01222.96
8.2.160.0070.00720.47
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00822.18
8.2.110.0030.00622.22
8.2.100.0060.00618.13
8.2.90.0090.00019.47
8.2.80.0060.00317.97
8.2.70.0030.00618.00
8.2.60.0130.00017.93
8.2.50.0030.00618.07
8.2.40.0080.00020.03
8.2.30.0030.00518.32
8.2.20.0030.00617.96
8.2.10.0050.00318.13
8.2.00.0050.00318.06
8.1.280.0090.00625.92
8.1.270.0030.00623.96
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.97
8.1.230.0090.00317.50
8.1.220.0060.00317.91
8.1.210.0050.00518.77
8.1.200.0070.00317.60
8.1.190.0040.00417.47
8.1.180.0050.00318.10
8.1.170.0000.00818.76
8.1.160.0040.00422.18
8.1.150.0080.00019.06
8.1.140.0030.00717.70
8.1.130.0040.00417.95
8.1.120.0030.00517.61
8.1.110.0000.00817.66
8.1.100.0030.00517.62
8.1.90.0080.00017.61
8.1.80.0050.00617.61
8.1.70.0040.00417.57
8.1.60.0060.00317.83
8.1.50.0040.00417.74
8.1.40.0080.00017.69
8.1.30.0000.00817.85
8.1.20.0090.00017.85
8.1.10.0050.00317.73
8.1.00.0060.00317.65
8.0.300.0040.00418.77
8.0.290.0050.00317.00
8.0.280.0050.00218.55
8.0.270.0000.00717.37
8.0.260.0000.00717.37
8.0.250.0000.00717.13
8.0.240.0060.00317.14
8.0.230.0000.00717.27
8.0.220.0000.00717.09
8.0.210.0000.00717.16
8.0.200.0040.00417.27
8.0.190.0050.00517.22
8.0.180.0000.00817.22
8.0.170.0030.00617.23
8.0.160.0060.00317.19
8.0.150.0000.01117.04
8.0.140.0050.00317.17
8.0.130.0040.00413.61
8.0.120.0030.00517.16
8.0.110.0040.00417.22
8.0.100.0040.00417.06
8.0.90.0040.00417.07
8.0.80.0070.00917.19
8.0.70.0040.00417.15
8.0.60.0040.00417.02
8.0.50.0040.00417.07
8.0.30.0120.00817.37
8.0.20.0020.01917.52
8.0.10.0000.00817.35
8.0.00.0070.01417.05
7.4.330.0000.00515.00
7.4.320.0000.00616.91
7.4.300.0060.00016.81
7.4.290.0050.00316.91
7.4.280.0000.00916.94
7.4.270.0040.00416.95
7.4.260.0110.00016.78
7.4.250.0040.00416.82
7.4.240.0060.00116.74
7.4.230.0060.00316.71
7.4.220.0090.01516.92
7.4.210.0150.00316.90
7.4.200.0050.00316.69
7.4.160.0090.00916.73
7.4.150.0140.00717.40
7.4.140.0140.00617.86
7.4.130.0110.00616.82
7.4.120.0070.01016.76
7.4.110.0190.00816.56
7.4.100.0070.01316.70
7.4.90.0030.01616.88
7.4.80.0070.01019.39
7.4.70.0030.01716.82
7.4.60.0110.00816.83
7.4.50.0050.00016.82
7.4.40.0180.00016.96
7.4.30.0140.00516.85
7.4.00.0050.01415.31
7.3.330.0030.00313.63
7.3.320.0000.00613.61
7.3.310.0000.00716.68
7.3.300.0080.00016.49
7.3.290.0090.00616.54
7.3.280.0050.01316.54
7.3.270.0130.00717.40
7.3.260.0110.00716.69
7.3.250.0080.01016.65
7.3.240.0070.01316.71
7.3.230.0150.00616.59
7.3.210.0030.01616.64
7.3.200.0030.01619.39
7.3.190.0070.01016.89
7.3.180.0040.01216.70
7.3.170.0090.01216.74
7.3.160.0030.01616.81
7.3.120.0100.00815.12
7.3.110.0100.00815.00
7.3.100.0090.00915.17
7.3.90.0070.00914.99
7.3.80.0070.00815.10
7.3.70.0040.01215.15
7.3.60.0080.00515.21
7.3.50.0060.00615.01
7.3.40.0050.00815.11
7.3.30.0030.01015.21
7.3.20.0050.01216.81
7.3.10.0110.00616.77
7.3.00.0100.00816.67
7.2.330.0070.01116.84
7.2.320.0070.01316.86
7.2.310.0060.01216.80
7.2.300.0040.01317.01
7.2.290.0070.01116.86
7.2.250.0150.00715.47
7.2.240.0070.00915.40
7.2.230.0070.01115.29
7.2.220.0080.00815.25
7.2.210.0030.01315.33
7.2.200.0070.00715.24
7.2.190.0050.00915.24
7.2.180.0040.01215.05
7.2.170.0020.01115.23
7.2.160.0040.01415.00
7.2.150.0040.01516.93
7.2.140.0140.00017.08
7.2.130.0070.00917.04
7.2.120.0100.00916.83
7.2.110.0030.01416.93
7.2.100.0110.00816.91
7.2.90.0100.00916.91
7.2.80.0130.00816.79
7.2.70.0140.00917.10
7.2.60.0040.01117.08
7.2.50.0100.00917.00
7.2.40.0130.00616.91
7.2.30.0090.00817.05
7.2.20.0100.00917.08
7.2.10.0110.00516.99
7.2.00.0060.01017.96
7.1.330.0050.01015.95
7.1.320.0050.01016.10
7.1.310.0030.01316.04
7.1.300.0090.00615.83
7.1.290.0070.00815.75
7.1.280.0050.00815.87
7.1.270.0040.01015.93
7.1.260.0050.00915.87
7.1.250.0080.01115.80
7.1.200.0250.00815.87
7.1.100.0000.01218.27
7.1.70.0000.00817.51
7.1.60.0090.01519.32
7.1.50.0000.01317.07
7.1.00.0070.07322.56
7.0.200.0040.01116.61
7.0.140.0030.07321.95
7.0.90.0270.06719.96
7.0.80.0500.08320.02
7.0.70.0170.08320.22
7.0.60.0100.05020.02
7.0.50.0200.07020.48
7.0.40.0070.04720.07
7.0.30.0170.07320.13
7.0.20.0030.09720.19
7.0.10.0130.07320.12
7.0.00.0000.05720.02
5.6.280.0070.07321.20
5.6.240.0030.09320.74
5.6.230.0130.08320.73
5.6.220.0100.07720.76
5.6.210.0030.06020.75
5.6.200.0130.04721.01
5.6.190.0100.05321.22
5.6.180.0100.08321.15
5.6.170.0100.08321.06
5.6.160.0000.05021.09
5.6.150.0130.08721.10
5.6.140.0130.04021.05
5.6.130.0070.04721.09
5.6.120.0000.05721.18
5.6.110.0170.07721.00
5.6.100.0070.05020.99
5.6.90.0100.08320.98
5.6.80.0000.05720.44
5.6.70.0070.05720.59
5.6.60.0070.04020.42
5.6.50.0070.04320.44
5.6.40.0100.03720.54
5.6.30.0100.03720.52
5.6.20.0000.04020.42
5.6.10.0000.04320.57
5.6.00.0070.04020.30
5.5.380.0100.08020.41
5.5.370.0100.07320.56
5.5.360.0200.07320.46
5.5.350.0070.06320.48
5.5.340.0030.08720.70
5.5.330.0070.08020.94
5.5.320.0100.08320.91
5.5.310.0130.08320.98
5.5.300.0100.08020.78
5.5.290.0100.05020.87
5.5.280.0070.08720.88
5.5.270.0070.05020.82
5.5.260.0100.08020.77
5.5.250.0170.08320.64
5.5.240.0200.06720.31
5.5.230.0030.04720.20
5.5.220.0030.04020.20
5.5.210.0000.04320.34
5.5.200.0000.04320.33
5.5.190.0030.04020.17
5.5.180.0000.04320.20
5.5.160.0030.04020.13
5.5.150.0030.04020.32
5.5.140.0030.04020.30
5.5.130.0100.03320.14
5.5.120.0000.04320.22
5.5.110.0070.03020.15
5.5.100.0000.03720.12
5.5.90.0070.04020.20
5.5.80.0030.04020.11
5.5.70.0000.03720.19
5.5.60.0000.04320.20
5.5.50.0030.04020.11
5.5.40.0070.03720.24
5.5.30.0030.04020.17
5.5.20.0070.03720.27
5.5.10.0070.03320.26
5.5.00.0100.03720.15
5.4.450.0100.07719.51
5.4.440.0130.06319.37
5.4.430.0170.07019.50
5.4.420.0070.08719.47
5.4.410.0000.08719.43
5.4.400.0170.06319.13
5.4.390.0030.05318.85
5.4.380.0000.05319.18
5.4.370.0000.05019.20
5.4.360.0030.04019.03
5.4.350.0030.04019.12
5.4.340.0000.04018.88
5.4.320.0070.03718.87
5.4.310.0070.03719.04
5.4.300.0000.04719.02
5.4.290.0030.04019.05
5.4.280.0070.03318.94
5.4.270.0000.03318.94
5.4.260.0100.03319.24
5.4.250.0100.02719.20
5.4.240.0000.04319.04
5.4.230.0030.04019.12
5.4.220.0030.05018.87
5.4.210.0130.03018.98
5.4.200.0000.04319.13
5.4.190.0030.03319.13
5.4.180.0100.04019.05
5.4.170.0030.06319.12
5.4.160.0030.03719.13
5.4.150.0070.03719.27
5.4.140.0030.03716.54
5.4.130.0030.03716.50
5.4.120.0030.07716.55
5.4.110.0000.03716.47
5.4.100.0030.04016.58
5.4.90.0000.05016.62
5.4.80.0070.03716.64
5.4.70.0030.03716.50
5.4.60.0000.04016.39
5.4.50.0030.03716.73
5.4.40.0000.04016.58
5.4.30.0030.07316.32
5.4.20.0130.04716.48
5.4.10.0070.07016.50
5.4.00.0000.03315.82
5.3.290.0030.03314.80
5.3.280.0100.03014.84
5.3.270.0030.04014.80
5.3.260.0030.04014.68
5.3.250.0030.04014.78
5.3.240.0000.04014.74
5.3.230.0030.04014.83
5.3.220.0030.04314.68
5.3.210.0100.03014.85
5.3.200.0000.05014.77
5.3.190.0000.04014.71
5.3.180.0030.03714.68
5.3.170.0100.03314.84
5.3.160.0070.03714.68
5.3.150.0070.03714.82
5.3.140.0000.04014.66
5.3.130.0030.04014.79
5.3.120.0000.04714.57
5.3.110.0070.09014.64
5.3.100.0030.04714.23
5.3.90.0070.04714.22
5.3.80.0030.03014.18
5.3.70.0030.03314.14
5.3.60.0200.07314.15
5.3.50.0070.05714.22
5.3.40.0030.07014.19
5.3.30.0100.07014.11
5.3.20.0070.05013.74
5.3.10.0030.04713.68
5.3.00.0000.08313.83
5.2.170.0000.05711.26
5.2.160.0100.05311.22
5.2.150.0030.05311.00
5.2.140.0030.05011.21
5.2.130.0100.02711.16
5.2.120.0030.03711.02
5.2.110.0000.06711.15
5.2.100.0070.03011.10
5.2.90.0030.03711.02
5.2.80.0130.05311.11
5.2.70.0130.05011.12
5.2.60.0100.04011.11
5.2.50.0070.04311.08
5.2.40.0000.06011.02
5.2.30.0030.05010.97
5.2.20.0100.03010.89
5.2.10.0030.06010.77
5.2.00.0000.06010.83
5.1.60.0030.05010.06
5.1.50.0000.0409.99
5.1.40.0030.04010.05
5.1.30.0030.05710.39
5.1.20.0000.03310.38
5.1.10.0000.03310.13
5.1.00.0000.05710.06
5.0.50.0030.0308.54
5.0.40.0070.0208.50
5.0.30.0030.0438.06
5.0.20.0000.0438.27
5.0.10.0000.0278.00
5.0.00.0000.0378.25
4.4.90.0000.0237.77
4.4.80.0000.0307.77
4.4.70.0030.0377.77
4.4.60.0000.0207.77
4.4.50.0000.0207.77
4.4.40.0030.0477.77
4.4.30.0000.0177.77
4.4.20.0000.0377.77
4.4.10.0000.0277.77
4.4.00.0030.0537.77
4.3.110.0070.0177.77
4.3.100.0030.0337.77
4.3.90.0070.0177.77
4.3.80.0000.0477.77
4.3.70.0030.0207.77
4.3.60.0030.0337.77
4.3.50.0000.0307.77
4.3.40.0070.0507.77
4.3.30.0000.0377.77
4.3.20.0000.0377.77
4.3.10.0000.0277.77
4.3.00.0000.0377.77

preferences:
34.74 ms | 401 KiB | 5 Q