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 = 'O:8:"stdClass":0:{}'; $test2 = '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.2.10.0050.00218.15
8.2.00.0000.00818.21
8.1.140.0000.00719.58
8.1.130.0040.00417.57
8.1.120.0040.00417.50
8.1.110.0000.00717.51
8.1.100.0000.00717.62
8.1.90.0000.00717.63
8.1.80.0040.00417.54
8.1.70.0000.00717.61
8.1.60.0050.00317.72
8.1.50.0050.00317.63
8.1.40.0040.00417.59
8.1.30.0030.00617.74
8.1.20.0000.00717.70
8.1.10.0050.00317.71
8.1.00.0040.00817.61
8.0.260.0060.00018.30
8.0.250.0000.00717.02
8.0.240.0000.00817.09
8.0.230.0070.00017.14
8.0.220.0080.00017.09
8.0.210.0000.00716.99
8.0.200.0030.00317.13
8.0.190.0080.00016.99
8.0.180.0070.00016.96
8.0.170.0040.00417.01
8.0.160.0020.00516.97
8.0.150.0000.00817.05
8.0.140.0000.00917.07
8.0.130.0030.00313.61
8.0.120.0000.00817.12
8.0.110.0060.00317.08
8.0.100.0040.00417.23
8.0.90.0040.00417.04
8.0.80.0060.01717.15
8.0.70.0040.00417.11
8.0.60.0050.00317.12
8.0.50.0000.00817.11
8.0.30.0130.00617.35
8.0.20.0130.00617.45
8.0.10.0040.00417.16
8.0.00.0140.00317.05
7.4.330.0000.00615.08
7.4.320.0060.00016.70
7.4.300.0000.00616.82
7.4.290.0030.00716.79
7.4.280.0030.00516.85
7.4.270.0040.00216.73
7.4.260.0000.00716.90
7.4.250.0030.00316.75
7.4.240.0050.00216.83
7.4.230.0030.00316.69
7.4.220.0070.00016.88
7.4.210.0090.01716.89
7.4.200.0050.00216.67
7.4.150.0180.00417.40
7.4.140.0070.01417.86
7.4.130.0100.00816.83
7.4.120.0080.00916.74
7.4.110.0170.00016.83
7.4.100.0120.00916.81
7.4.90.0030.01416.65
7.4.80.0000.01719.39
7.4.70.0030.01316.55
7.4.60.0060.00916.81
7.4.50.0000.01516.74
7.4.40.0070.01616.55
7.4.30.0090.01316.84
7.4.00.0040.01115.05
7.3.330.0000.00813.29
7.3.320.0030.00313.42
7.3.310.0070.00016.50
7.3.300.0000.00716.42
7.3.290.0020.00516.56
7.3.280.0080.00816.50
7.3.270.0170.00017.40
7.3.260.0110.00616.53
7.3.250.0140.00816.63
7.3.240.0070.01016.54
7.3.230.0110.00816.52
7.3.210.0060.01216.65
7.3.200.0090.00916.55
7.3.190.0120.00616.59
7.3.180.0090.00616.33
7.3.170.0120.00416.40
7.3.160.0120.00316.63
7.3.120.0030.01414.84
7.3.110.0100.01014.79
7.3.100.0090.00615.10
7.3.90.0070.00715.00
7.3.80.0030.01215.14
7.3.70.0090.00314.79
7.3.60.0110.00415.02
7.3.50.0070.00715.19
7.3.40.0040.00514.85
7.3.30.0090.00614.84
7.3.20.0060.00616.83
7.3.10.0090.00616.64
7.3.00.0030.01316.96
7.2.330.0090.00716.77
7.2.320.0230.00016.69
7.2.310.0040.01516.79
7.2.300.0160.00016.90
7.2.290.0110.00516.54
7.2.240.0060.01014.88
7.2.230.0090.00614.93
7.2.220.0060.00915.25
7.2.210.0090.00914.96
7.2.200.0110.00314.77
7.2.190.0000.01715.16
7.2.180.0040.01514.82
7.2.170.0070.00714.77
7.2.160.0060.00815.05
7.2.150.0040.00916.86
7.2.140.0060.00617.15
7.2.130.0100.00717.05
7.2.120.0000.01316.76
7.2.110.0080.00417.01
7.2.100.0030.00916.76
7.2.90.0030.01417.18
7.2.80.0100.00317.17
7.2.70.0090.00616.89
7.2.60.0040.01016.88
7.2.50.0110.00417.06
7.2.40.0040.00816.89
7.2.30.0090.00617.01
7.2.20.0100.00316.75
7.2.10.0060.00917.07
7.2.00.0050.01118.31
7.1.330.0090.00616.21
7.1.320.0120.00015.79
7.1.310.0030.01015.85
7.1.300.0040.00815.99
7.1.290.0070.00715.98
7.1.280.0090.00415.51
7.1.270.0000.01016.00
7.1.260.0040.01215.86
7.1.250.0060.00915.75
7.1.200.0070.00716.12
7.1.100.0070.00718.01
7.1.70.0060.00317.37
7.1.60.0070.02017.53
7.1.50.0060.00617.11
7.1.40.0080.00416.89
7.1.30.0030.01016.91
7.1.20.0040.00816.92
7.1.10.0000.01016.56
7.1.00.0070.00417.02
7.0.200.0040.01116.92
7.0.190.0000.00816.89
7.0.180.0030.00516.54
7.0.170.0050.00216.46
7.0.160.0000.00816.44
7.0.150.0000.01116.44
7.0.140.0000.00816.57
7.0.130.0030.00816.67
7.0.120.0000.00716.46
7.0.110.0000.00916.44
7.0.100.0000.01016.44
7.0.90.0040.00716.67
7.0.80.0000.00716.47
7.0.70.0040.00416.62
7.0.60.0000.01116.44
7.0.50.0030.00616.69
7.0.40.0030.00616.44
7.0.30.0040.01216.44
7.0.20.0040.00416.44
7.0.10.0000.01116.44
7.0.00.0040.00416.44
5.6.300.0000.05720.87
5.6.290.0130.04220.76
5.6.280.0070.03521.08
5.6.270.0070.04720.91
5.6.260.0070.04120.88
5.6.250.0070.04220.87
5.6.240.0100.04220.96
5.6.230.0100.04020.98
5.6.220.0030.04020.79
5.6.210.0070.07720.79
5.6.200.0040.04221.03
5.6.190.0030.04420.84
5.6.180.0100.04821.03
5.6.170.0100.06720.83
5.6.160.0030.04820.94
5.6.150.0100.04321.04
5.6.140.0070.04321.03
5.6.130.0000.04420.91
5.6.120.0070.08320.86
5.6.110.0000.04320.99
5.6.100.0100.03720.92
5.6.90.0030.04221.01
5.6.80.0000.04520.21
5.6.70.0030.04020.21
5.6.60.0000.04320.40
5.6.50.0000.04120.41
5.6.40.0100.08620.20
5.6.30.0060.03620.10
5.6.20.0000.08420.40
5.6.10.0100.03320.09
5.6.00.0030.03820.08
5.5.380.0000.05317.53
5.5.370.0000.04117.53
5.5.360.0030.04417.55
5.5.350.0030.04517.55
5.5.340.0070.04017.84
5.5.330.0030.04817.71
5.5.320.0000.04318.10
5.5.310.0070.06717.86
5.5.300.0070.04718.09
5.5.290.0000.04318.03
5.5.280.0030.04118.09
5.5.270.0000.05218.02
5.5.260.0030.04418.05
5.5.250.0000.04217.85
5.5.240.0030.08117.48
5.5.230.0030.04717.12
5.5.220.0030.05017.41
5.5.210.0030.06017.12
5.5.200.0030.04217.21
5.5.190.0030.04417.45
5.5.180.0100.03217.10
5.5.160.0000.03917.12
5.5.150.0000.04817.43
5.5.140.0060.03617.18
5.5.130.0030.03717.38
5.5.120.0070.03417.45
5.5.110.0000.03917.43
5.5.100.0070.07917.30
5.5.90.0030.04617.37
5.5.80.0000.04217.34
5.5.70.0030.04117.27
5.5.60.0000.04116.94
5.5.50.0000.04016.93
5.5.40.0000.07617.29
5.5.30.0070.04317.32
5.5.20.0070.03316.94
5.5.10.0000.04617.24
5.5.00.0030.07217.32
5.4.450.0070.06119.53
5.4.440.0200.04419.22
5.4.430.0030.04219.24
5.4.420.0030.04119.27
5.4.410.0030.04019.28
5.4.400.0000.07519.24
5.4.390.0030.04718.95
5.4.380.0070.03318.92
5.4.370.0070.07718.98
5.4.360.0000.04119.20
5.4.350.0000.04618.98
5.4.340.0000.05119.07
5.4.320.0000.04018.97
5.4.310.0060.03519.08
5.4.300.0000.06119.06
5.4.290.0030.03818.95
5.4.280.0030.05018.98
5.4.270.0000.04019.16
5.4.260.0100.04419.07
5.4.250.0030.03918.97
5.4.240.0030.04619.07
5.4.230.0000.04019.13
5.4.220.0070.04819.08
5.4.210.0070.06718.89
5.4.200.0030.04119.20
5.4.190.0030.04019.02
5.4.180.0000.04119.05
5.4.170.0000.04018.88
5.4.160.0000.05718.96
5.4.150.0030.03918.96
5.4.140.0000.04916.52
5.4.130.0030.03316.76
5.4.120.0160.06416.44
5.4.110.0000.03916.63
5.4.100.0200.03716.71
5.4.90.0030.04416.64
5.4.80.0030.04116.63
5.4.70.0060.03516.46
5.4.60.0030.04816.73
5.4.50.0000.03816.60
5.4.40.0030.03316.52
5.4.30.0000.03616.59
5.4.20.0030.03416.74
5.4.10.0070.04616.67
5.4.00.0040.03616.44
5.3.290.0090.03116.44
5.3.280.0070.03716.44
5.3.270.0000.04116.44
5.3.260.0060.03416.44
5.3.250.0000.04116.44
5.3.240.0320.03516.44
5.3.230.0070.07816.44
5.3.220.0030.06116.44
5.3.210.0000.04116.44
5.3.200.0030.03716.44
5.3.190.0000.04816.44
5.3.180.0060.03816.44
5.3.170.0070.03116.44
5.3.160.0030.04116.44
5.3.150.0000.04116.44
5.3.140.0000.07716.44
5.3.130.0030.09916.44
5.3.120.0000.04216.44
5.3.110.0070.03316.44
5.3.100.0160.04116.44
5.3.90.0000.04016.44
5.3.80.0070.02916.44
5.3.70.0000.03716.44
5.3.60.0000.03716.44
5.3.50.0000.03816.44
5.3.40.0000.04516.44
5.3.30.0060.03116.44
5.3.20.0030.08316.44
5.3.10.0030.03116.44
5.3.00.0000.03916.44
5.2.170.0030.03016.44
5.2.160.0030.03016.44
5.2.150.0060.02816.44
5.2.140.0030.05316.44
5.2.130.0060.04116.44
5.2.120.0030.03816.44
5.2.110.0070.03016.44
5.2.100.0030.02816.44
5.2.90.0030.02616.44
5.2.80.0030.02716.44
5.2.70.0000.03516.44
5.2.60.0000.04516.44
5.2.50.0030.04416.44
5.2.40.0000.05616.44
5.2.30.0040.03516.44
5.2.20.0000.03116.44
5.2.10.0000.02916.44
5.2.00.0030.03016.44
5.1.60.0140.03116.44
5.1.50.0030.03016.44
5.1.40.0030.03116.44
5.1.30.0000.03016.44
5.1.20.0070.04016.44
5.1.10.0030.02616.44
5.1.00.0060.02916.44
5.0.50.0160.01616.44
5.0.40.0000.02216.44
5.0.30.0030.03916.44
5.0.20.0030.03816.44
5.0.10.0040.01816.44
5.0.00.0000.03416.44
4.4.90.0000.02016.44
4.4.80.0000.01916.44
4.4.70.0000.01816.44
4.4.60.0000.01716.44
4.4.50.0030.01416.44
4.4.40.0000.02516.44
4.4.30.0000.01716.44
4.4.20.0030.02016.44
4.4.10.0030.01516.44
4.4.00.0000.02516.44
4.3.110.0030.02816.44
4.3.100.0070.02016.44
4.3.90.0000.02116.44
4.3.80.0060.02616.44
4.3.70.0060.01916.44
4.3.60.0000.01616.44
4.3.50.0000.02416.44
4.3.40.0100.02816.44
4.3.30.0000.01716.44
4.3.20.0130.01316.44
4.3.10.0030.01716.44
4.3.00.0000.01716.44

preferences:
12.65 ms | 403 KiB | 5 Q