3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sugar_unserialize($value) { preg_match('/[oc]:\d+:/i', $value, $matches); if (count($matches)) { return false; } return unserialize($value); } $test1 = 'a:1:{i:0;O:8:"stdClass":0:{}}'; $test2 = 'a:1:{i:0;O:+8:"stdClass":0:{}}'; var_dump(sugar_unserialize($test1), sugar_unserialize($test2));

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.0140.00016.84
8.3.50.0130.00918.18
8.3.40.0000.01518.96
8.3.30.0060.00818.68
8.3.20.0040.00419.29
8.3.10.0040.00421.82
8.3.00.0080.00020.87
8.2.180.0000.01518.54
8.2.170.0180.00422.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00818.09
8.2.120.0040.00426.35
8.2.110.0000.01022.09
8.2.100.0000.01217.97
8.2.90.0090.00017.63
8.2.80.0030.00518.86
8.2.70.0080.00017.63
8.2.60.0000.00817.63
8.2.50.0080.00017.80
8.2.40.0080.00019.78
8.2.30.0040.00420.54
8.2.20.0000.00917.81
8.2.10.0000.00718.20
8.2.00.0070.00018.16
8.1.280.0030.01225.92
8.1.270.0080.00023.99
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0110.00017.48
8.1.230.0040.00720.88
8.1.220.0000.00817.74
8.1.210.0030.00718.77
8.1.200.0060.00317.48
8.1.190.0060.00317.61
8.1.180.0030.00618.10
8.1.170.0040.00417.62
8.1.160.0040.00420.97
8.1.150.0040.00418.98
8.1.140.0000.00719.54
8.1.130.0040.00417.58
8.1.120.0000.00717.50
8.1.110.0040.00417.51
8.1.100.0040.00417.50
8.1.90.0040.00417.66
8.1.80.0000.00817.56
8.1.70.0040.00417.55
8.1.60.0000.00917.72
8.1.50.0000.00917.66
8.1.40.0050.00317.66
8.1.30.0030.00617.70
8.1.20.0040.00417.81
8.1.10.0000.00817.59
8.1.00.0060.00617.48
8.0.300.0000.00718.79
8.0.290.0050.00616.74
8.0.280.0000.00718.43
8.0.270.0030.00317.21
8.0.260.0000.00716.87
8.0.250.0070.00017.14
8.0.240.0030.00317.02
8.0.230.0030.00317.13
8.0.220.0070.00017.10
8.0.210.0030.00316.97
8.0.200.0000.00716.93
8.0.190.0070.00017.03
8.0.180.0040.00416.94
8.0.170.0040.00416.99
8.0.160.0070.00017.18
8.0.150.0000.00817.07
8.0.140.0040.00416.97
8.0.130.0030.00313.54
8.0.120.0020.00517.18
8.0.110.0030.00517.13
8.0.100.0040.00417.16
8.0.90.0000.00716.94
8.0.80.0070.00817.16
8.0.70.0040.00417.08
8.0.60.0050.00317.04
8.0.50.0050.00217.24
8.0.30.0100.01017.40
8.0.20.0140.00817.40
8.0.10.0000.00817.35
8.0.00.0140.00616.88
7.4.330.0030.00316.70
7.4.320.0000.00616.80
7.4.300.0000.00716.70
7.4.290.0060.00316.92
7.4.280.0060.00316.87
7.4.270.0050.00216.79
7.4.260.0030.00316.82
7.4.250.0030.00316.86
7.4.240.0030.00316.75
7.4.230.0000.00716.98
7.4.220.0090.00916.90
7.4.210.0060.01016.79
7.4.200.0030.00316.80
7.4.160.0060.00916.66
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0090.01016.59
7.4.120.0080.01216.71
7.4.110.0100.00616.56
7.4.100.0160.00016.78
7.4.90.0140.00316.77
7.4.80.0070.01019.39
7.4.70.0080.00816.77
7.4.60.0090.01316.89
7.4.50.0070.00716.56
7.4.40.0140.01016.84
7.4.30.0100.00716.84
7.4.10.0100.00714.93
7.4.00.0020.01415.15
7.3.330.0040.00313.54
7.3.320.0050.00013.51
7.3.310.0030.00316.39
7.3.300.0000.00716.33
7.3.290.0070.00016.37
7.3.280.0070.00916.54
7.3.270.0120.00617.40
7.3.260.0130.00316.56
7.3.250.0140.00616.54
7.3.240.0130.00416.63
7.3.230.0090.00616.64
7.3.210.0130.00316.51
7.3.200.0120.00616.58
7.3.190.0110.00616.59
7.3.180.0120.00316.72
7.3.170.0090.00816.75
7.3.160.0070.01016.67
7.3.130.0100.01015.02
7.3.120.0080.01014.86
7.3.110.0060.01214.99
7.3.100.0090.00615.19
7.3.90.0070.00715.10
7.3.80.0060.00614.83
7.3.70.0000.00914.66
7.3.60.0030.01415.05
7.3.50.0100.00715.00
7.3.40.0040.01114.93
7.3.30.0060.00814.90
7.3.20.0110.00316.70
7.3.10.0080.00316.62
7.3.00.0040.01116.76
7.2.330.0030.01416.77
7.2.320.0170.00316.76
7.2.310.0060.01716.82
7.2.300.0070.01016.73
7.2.290.0140.00316.75
7.2.260.0000.01515.19
7.2.250.0100.01015.20
7.2.240.0040.01115.10
7.2.230.0110.00715.14
7.2.220.0060.00615.18
7.2.210.0090.00615.32
7.2.200.0130.00015.00
7.2.190.0100.00515.20
7.2.180.0030.00615.06
7.2.170.0110.00414.88
7.2.160.0000.01515.10
7.2.150.0060.00916.93
7.2.140.0030.00616.98
7.2.130.0040.01116.91
7.2.120.0000.01016.95
7.2.110.0070.00717.01
7.2.100.0030.01416.82
7.2.90.0110.00717.09
7.2.80.0070.01116.78
7.2.70.0000.01516.84
7.2.60.0050.00917.10
7.2.50.0110.00616.97
7.2.40.0030.00717.02
7.2.30.0130.00917.29
7.2.20.0100.01217.52
7.2.10.0080.01417.43
7.2.00.0090.01218.23
7.1.330.0030.01015.83
7.1.320.0100.00716.09
7.1.310.0000.00816.04
7.1.300.0040.01215.84
7.1.290.0080.00315.73
7.1.280.0080.00515.84
7.1.270.0110.00315.93
7.1.260.0090.00315.92
7.1.250.0000.01016.07
7.1.240.0000.01215.68
7.1.230.0090.00615.72
7.1.220.0070.00715.66
7.1.210.0140.00315.68
7.1.200.0070.00815.88
7.1.190.0090.00315.87
7.1.180.0030.01015.98
7.1.170.0030.01015.86
7.1.160.0000.01415.56
7.1.150.0080.01216.41
7.1.140.0060.01016.56
7.1.130.0130.01016.53
7.1.120.0150.01016.50
7.1.110.0090.01216.13
7.1.100.0270.00916.79
7.1.90.0130.00816.17
7.1.80.0130.01016.21
7.1.70.0120.00716.25
7.1.60.0150.01322.79
7.1.50.0150.00921.92
7.1.40.0180.01324.34
7.1.30.0190.01224.39
7.1.20.0190.01424.32
7.1.10.0060.01215.25
7.1.00.0050.03217.69
7.0.330.0070.01315.41
7.0.320.0040.01115.52
7.0.310.0060.00615.14
7.0.300.0040.01115.13
7.0.290.0100.00315.67
7.0.280.0040.00415.46
7.0.270.0120.00716.01
7.0.260.0110.01216.10
7.0.250.0110.00715.73
7.0.240.0140.00815.65
7.0.230.0130.00915.75
7.0.220.0080.01115.59
7.0.210.0070.00915.08
7.0.200.0320.00514.99
7.0.190.0070.01015.17
7.0.180.0110.01115.10
7.0.170.0110.00914.89
7.0.160.0050.01015.07
7.0.150.0060.01115.06
7.0.140.0100.00915.03
7.0.130.0210.00715.04
7.0.120.0040.01315.11
7.0.110.0110.00715.23
7.0.100.0090.01015.06
7.0.90.0130.00814.96
7.0.80.0080.01015.01
7.0.70.0090.00814.92
7.0.60.1230.00716.68
7.0.50.0300.00716.83
7.0.40.0310.00616.19
7.0.30.0330.00616.18
7.0.20.0340.00516.11
7.0.10.0310.00616.21
7.0.00.0300.00716.16
5.6.400.0030.00613.84
5.6.390.0030.01614.14
5.6.380.0030.01014.37
5.6.370.0070.00314.63
5.6.360.0000.00814.53
5.6.350.0130.00314.03
5.6.340.0030.01014.51
5.6.330.0030.00714.22
5.6.320.0080.00414.51
5.6.310.0040.00814.59
5.6.300.0120.03317.48
5.6.290.0150.04217.65
5.6.280.0080.04818.62
5.6.270.0110.03717.48
5.6.260.0130.03717.52
5.6.250.0090.03217.59
5.6.240.0110.04117.63
5.6.230.0130.03517.53
5.6.220.0100.03217.49
5.6.210.0340.02518.64
5.6.200.0350.02318.66
5.6.190.0300.02318.70
5.6.180.0340.02718.76
5.6.170.0410.02218.76
5.6.160.0360.02318.65
5.6.150.0330.02418.70
5.6.140.0320.02518.73
5.6.130.0330.02818.69
5.6.120.0350.02218.66
5.6.110.0320.02218.76
5.6.100.0310.02618.61
5.6.90.0340.02218.75
5.6.80.0280.02518.27
5.6.70.0390.02718.27
5.6.60.0310.02318.18
5.6.50.0380.02518.30
5.6.40.0380.02118.17
5.6.30.0370.02318.25
5.6.20.0460.02518.22
5.6.10.0390.02318.31
5.6.00.0350.02018.19
5.5.380.0180.07417.41
5.5.370.0210.06617.47
5.5.360.0150.06317.56
5.5.350.0470.03718.89
5.5.340.0460.02719.42
5.5.330.0490.02619.55
5.5.320.0460.02919.39
5.5.310.0570.03419.29
5.5.300.0430.03119.53
5.5.290.0480.03419.33
5.5.280.0500.03019.43
5.5.270.0480.04019.38
5.5.260.0470.04019.41
5.5.250.0500.02719.25
5.5.240.0420.04318.79
5.5.230.0550.02818.92
5.5.220.0470.02818.80
5.5.210.0550.04018.87
5.5.200.0510.03018.80
5.5.190.0480.03518.78
5.5.180.0600.02818.87
5.5.160.0430.04018.82
5.5.150.0450.03418.93
5.5.140.0440.02918.78
5.5.130.0520.02718.76
5.5.120.0430.02718.77
5.5.110.0530.02618.61
5.5.100.0490.03618.46
5.5.90.0430.02818.62
5.5.80.0450.03418.71
5.5.70.0510.03018.75
5.5.60.0410.03018.66
5.5.50.0500.03618.54
5.5.40.0410.02918.69
5.5.30.0470.02818.54
5.5.20.0450.03318.57
5.5.10.0440.02918.71
5.5.00.0450.02818.66

preferences:
60.73 ms | 400 KiB | 5 Q