3v4l.org

run code in 300+ PHP versions simultaneously
<?php const INT_SIGNED = 1; const INT_LE = 2; function unpack_int32($str, $flags = 0) { $length = strlen($str); if ($length < 4) { return false; } else if ($length > 4) { $str = substr($str, 0, 4); } $format = ($flags & INT_LE) ? 'V' : 'N'; $result = current(unpack($format, $str)); $signBit = (bool) ($result & 0x80000000); $isSigned = (bool) ($flags & INT_SIGNED); $is32bit = PHP_INT_MAX < 0x80000000; if ($signBit && $isSigned && !$is32bit) { $result = 0xFFFFFFFF00000000 | $result; } else if ($signBit && !$isSigned && $is32bit) { $result = (($result & 0x7FFFFFFF) * 2) + ~$result + 1; } return $result; } var_dump(unpack_int32("\x81\x00\x00\x00"));

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.63
8.3.60.0030.01016.38
8.3.50.0110.00722.04
8.3.40.0090.01218.75
8.3.30.0140.00018.98
8.3.20.0050.00220.19
8.3.10.0080.00023.48
8.3.00.0080.00019.25
8.2.180.0120.00618.17
8.2.170.0070.00722.96
8.2.160.0170.00020.32
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0040.00422.25
8.2.110.0060.00322.25
8.2.100.0060.00617.84
8.2.90.0050.00319.18
8.2.80.0000.00817.97
8.2.70.0040.00417.61
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.13
8.2.30.0110.00018.05
8.2.20.0000.01017.58
8.2.10.0070.00018.08
8.2.00.0050.00317.62
8.1.280.0070.01125.92
8.1.270.0050.00321.95
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0060.00323.84
8.1.230.0070.00419.01
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0030.00517.39
8.1.180.0030.00518.10
8.1.170.0040.00418.64
8.1.160.0040.00421.97
8.1.150.0040.00418.64
8.1.140.0040.00417.52
8.1.130.0030.00317.75
8.1.120.0000.00717.37
8.1.110.0000.00717.43
8.1.100.0070.00017.35
8.1.90.0040.00417.48
8.1.80.0050.00317.45
8.1.70.0070.00017.35
8.1.60.0030.00517.60
8.1.50.0000.00817.55
8.1.40.0030.00517.52
8.1.30.0030.00517.63
8.1.20.0080.00017.70
8.1.10.0030.00517.42
8.1.00.0040.00417.38
8.0.300.0030.00318.77
8.0.290.0000.00717.02
8.0.280.0090.00018.45
8.0.270.0070.00017.26
8.0.260.0000.00616.73
8.0.250.0070.00016.91
8.0.240.0050.00217.02
8.0.230.0000.00716.86
8.0.220.0070.00016.77
8.0.210.0030.00316.90
8.0.200.0060.00016.94
8.0.190.0040.00417.02
8.0.180.0000.00716.90
8.0.170.0000.00816.87
8.0.160.0000.00716.95
8.0.150.0050.00316.87
8.0.140.0050.00316.82
8.0.130.0030.00313.36
8.0.120.0030.00516.81
8.0.110.0040.00416.79
8.0.100.0030.00516.72
8.0.90.0000.00816.81
8.0.80.0070.00816.94
8.0.70.0000.00816.82
8.0.60.0000.00716.79
8.0.50.0080.00016.80
8.0.30.0120.00617.07
8.0.20.0110.00717.40
8.0.10.0040.00416.98
8.0.00.0120.00816.71
7.4.330.0000.00515.00
7.4.320.0000.00716.50
7.4.300.0060.00016.52
7.4.290.0000.00816.52
7.4.280.0040.00416.51
7.4.270.0070.00016.56
7.4.260.0030.00316.46
7.4.250.0000.00716.63
7.4.240.0050.00316.49
7.4.230.0030.00316.64
7.4.220.0120.00816.57
7.4.210.0080.00716.53
7.4.200.0000.00716.63
7.4.190.0030.00416.71
7.4.160.0100.00716.38
7.4.150.0130.00317.40
7.4.140.0100.00917.86
7.4.130.0120.00716.45
7.4.120.0070.01116.54
7.4.110.0060.01316.48
7.4.100.0090.00916.59
7.4.90.0120.00416.34
7.4.80.0100.01319.39
7.4.70.0070.01016.60
7.4.60.0100.00716.34
7.4.50.0000.00416.45
7.4.40.0000.01622.77
7.4.30.0090.00616.75
7.4.10.0060.01214.96
7.4.00.0020.01615.11
7.3.330.0050.00013.29
7.3.320.0000.00613.34
7.3.310.0000.00716.18
7.3.300.0030.00316.38
7.3.290.0100.01016.35
7.3.280.0110.00816.33
7.3.270.0100.00717.40
7.3.260.0130.00416.74
7.3.250.0120.00616.33
7.3.240.0070.01416.41
7.3.230.0070.01016.39
7.3.210.0060.01216.53
7.3.200.0070.01616.70
7.3.190.0130.00816.29
7.3.180.0090.00616.56
7.3.170.0110.00716.46
7.3.160.0060.01016.50
7.3.130.0090.00914.91
7.3.120.0090.00714.95
7.3.110.0090.00714.99
7.3.100.0090.00514.79
7.3.90.0030.01214.98
7.3.80.0050.00814.92
7.3.70.0030.01014.86
7.3.60.0070.00514.87
7.3.50.0100.00514.94
7.3.40.0050.00914.80
7.3.30.0040.00814.65
7.3.20.0050.01016.67
7.3.10.0050.01016.75
7.3.00.0080.00816.63
7.2.330.0120.01216.55
7.2.320.0060.01216.77
7.2.310.0080.00816.46
7.2.300.0120.00916.70
7.2.290.0100.01216.53
7.2.260.0040.01115.12
7.2.250.0070.01014.74
7.2.240.0090.00515.11
7.2.230.0060.01015.17
7.2.220.0030.01114.96
7.2.210.0070.00614.90
7.2.200.0090.00414.93
7.2.190.0070.01015.17
7.2.180.0080.00815.14
7.2.170.0110.00414.88
7.2.160.0150.00214.91
7.2.150.0100.00316.87
7.2.140.0050.01016.97
7.2.130.0050.01017.06
7.2.120.0110.00516.98
7.2.110.0070.00917.00
7.2.100.0030.01216.93
7.2.90.0080.00817.10
7.2.80.0080.00816.76
7.2.70.0120.00416.87
7.2.60.0050.01017.08
7.2.50.0100.00317.03
7.2.40.0030.01117.10
7.2.30.0060.00916.97
7.2.20.0020.01616.86
7.2.10.0030.01216.88
7.2.00.0060.00817.71
7.1.330.0080.00515.82
7.1.320.0070.01015.76
7.1.310.0070.00615.74
7.1.300.0060.01015.81
7.1.290.0030.01215.61
7.1.280.0070.00615.74
7.1.270.0080.00615.76
7.1.260.0100.00615.88
7.1.250.0050.01015.84
7.1.240.0030.01015.86
7.1.230.0000.01215.95
7.1.220.0030.01015.85
7.1.210.0130.00015.61
7.1.200.0080.00515.89
7.1.190.0070.00415.88
7.1.180.0030.00815.95
7.1.170.0070.01015.84
7.1.160.0030.00815.62
7.1.150.0040.00715.86
7.1.140.0070.00315.92
7.1.130.0000.01515.84
7.1.120.0100.00315.59
7.1.110.0050.00315.97
7.1.100.0100.00616.96
7.1.90.0080.00815.76
7.1.80.0080.00615.84
7.1.70.0050.00616.33
7.1.60.0050.00617.59
7.1.50.0050.01416.52
7.1.40.0030.01315.95
7.1.30.0070.00715.68
7.1.20.0070.00415.86
7.1.10.0070.00715.82
7.1.00.0090.03819.09
7.0.330.0030.00615.54
7.0.320.0060.00615.43
7.0.310.0060.00615.19
7.0.300.0070.00715.47
7.0.290.0030.01015.48
7.0.280.0040.01115.39
7.0.270.0040.00815.55
7.0.260.0000.01415.36
7.0.250.0070.00715.44
7.0.240.0030.01415.59
7.0.230.0060.00915.22
7.0.220.0110.00415.37
7.0.210.0040.01115.48
7.0.200.0080.00316.19
7.0.190.0100.00315.50
7.0.180.0030.01415.48
7.0.170.0070.01015.64
7.0.160.0000.01315.23
7.0.150.0000.01315.48
7.0.140.0050.04018.85
7.0.130.0080.00015.50
7.0.120.0030.00715.44
7.0.110.0060.00915.30
7.0.100.0210.03717.73
7.0.90.0070.04417.73
7.0.80.0070.04717.63
7.0.70.0100.02517.74
7.0.60.0070.04717.75
7.0.50.0090.04417.90
7.0.40.0100.03516.77
7.0.30.0080.04316.83
7.0.20.0110.04016.84
7.0.10.0050.04416.88
7.0.00.0080.04016.69
5.6.400.0100.00314.17
5.6.390.0030.00614.18
5.6.380.0000.01214.18
5.6.370.0030.01114.30
5.6.360.0030.01014.64
5.6.350.0040.00814.37
5.6.340.0100.00314.20
5.6.330.0000.01314.54
5.6.320.0100.00614.63
5.6.310.0030.00614.45
5.6.300.0040.01114.17
5.6.290.0040.01114.35
5.6.280.0050.03817.52
5.6.270.0030.01214.38
5.6.260.0000.01514.42
5.6.250.0070.04517.32
5.6.240.0020.05017.69
5.6.230.0060.04717.42
5.6.220.0060.03817.32
5.6.210.0080.04117.33
5.6.200.0050.02517.68
5.6.190.0050.04317.63
5.6.180.0080.04017.68
5.6.170.0100.04317.77
5.6.160.0070.03717.73
5.6.150.0070.04217.78
5.6.140.0070.03917.73
5.6.130.0070.04717.75
5.6.120.0100.04217.72
5.6.110.0050.04517.74
5.6.100.0020.04917.67
5.6.90.0070.04317.71
5.6.80.0050.04217.35
5.6.70.0050.02617.21
5.6.60.0030.03817.25
5.6.50.0020.05017.16
5.6.40.0110.04117.27
5.6.30.0080.04417.38
5.6.20.0050.04117.33
5.6.10.0030.04317.40
5.6.00.0020.04217.37
5.5.380.0020.02717.27
5.5.370.0090.02517.46
5.5.360.0080.04117.41
5.5.350.0060.04317.37
5.5.340.0050.04817.39
5.5.330.0070.03817.63
5.5.320.0080.03017.63
5.5.310.0000.05117.55
5.5.300.0060.03017.44
5.5.290.0110.03117.63
5.5.280.0050.04317.56
5.5.270.0090.03917.50
5.5.260.0020.03217.60
5.5.250.0020.05417.25
5.5.240.0080.04017.11
5.5.230.0080.03917.15
5.5.220.0130.03517.10
5.5.210.0070.03217.08
5.5.200.0100.04017.16
5.5.190.0050.04017.17
5.5.180.0110.03017.23
5.5.170.0000.01314.47
5.5.160.0080.03817.30
5.5.150.0070.04317.16
5.5.140.0070.04417.32
5.5.130.0050.02617.19
5.5.120.0080.04316.92
5.5.110.0030.04617.29
5.5.100.0030.04917.11
5.5.90.0050.04217.08
5.5.80.0090.03917.03
5.5.70.0100.04016.99
5.5.60.0100.03817.30
5.5.50.0050.03717.17
5.5.40.0110.02317.17
5.5.30.0040.03917.10
5.5.20.0050.04117.25
5.5.10.0050.02617.00
5.5.00.0100.04717.02
5.4.450.0090.04115.26
5.4.440.0050.02815.29
5.4.430.0070.03715.17
5.4.420.0050.04015.30
5.4.410.0100.03715.15
5.4.400.0070.02315.14
5.4.390.0080.04115.01
5.4.380.0080.03614.89
5.4.370.0090.03115.00
5.4.360.0080.03814.87
5.4.350.0120.02414.99
5.4.340.0080.03815.11
5.4.330.0040.00411.04
5.4.320.0090.03215.05
5.4.310.0070.02515.04
5.4.300.0050.04314.93
5.4.290.0050.04015.05
5.4.280.0080.04014.94
5.4.270.0030.04215.03
5.4.260.0060.03514.90
5.4.250.0080.04015.15
5.4.240.0080.03215.12
5.4.230.0110.03114.96
5.4.220.0050.02814.98
5.4.210.0100.03215.02
5.4.200.0120.01815.11
5.4.190.0070.03814.94
5.4.180.0100.02515.14
5.4.170.0080.04015.13
5.4.160.0050.04014.94
5.4.150.0070.03314.96
5.4.140.0020.03913.75
5.4.130.0050.04013.62
5.4.120.0070.03813.58
5.4.110.0000.04313.60
5.4.100.0040.03713.71
5.4.90.0080.02513.79
5.4.80.0050.02913.73
5.4.70.0030.03313.79
5.4.60.0050.04013.72
5.4.50.0050.04213.55
5.4.40.0090.03613.69
5.4.30.0100.03413.74
5.4.20.0020.03013.54
5.4.10.0080.04513.55
5.4.00.0000.04713.55
5.3.290.0060.04112.77
5.3.280.0020.04212.67
5.3.270.0020.04812.68
5.3.260.0030.04212.67
5.3.250.0050.02812.63
5.3.240.0030.02512.65
5.3.230.0050.03012.65
5.3.220.0000.02612.61
5.3.210.0070.04412.61
5.3.200.0040.03212.68
5.3.190.0000.04612.69
5.3.180.0100.03312.64
5.3.170.0070.03812.66
5.3.160.0110.03512.71
5.3.150.0030.03112.68
5.3.140.0070.02512.68
5.3.130.0050.02512.68
5.3.120.0060.02212.60
5.3.110.0020.04012.65
5.3.100.0050.03212.42
5.3.90.0120.03312.33
5.3.80.0030.03312.42
5.3.70.0090.03812.38
5.3.60.0110.03112.39
5.3.50.0100.03812.37
5.3.40.0050.04312.29
5.3.30.0000.03512.28
5.3.20.0050.03612.20
5.3.10.0080.03512.22
5.3.00.0030.04112.20
5.2.170.0130.03311.14
5.2.160.0070.06311.14
5.2.150.0070.04710.98
5.2.140.0070.06310.98
5.2.130.0000.05011.10
5.2.120.0000.06311.11
5.2.110.0000.07311.14
5.2.100.0100.05710.91
5.2.90.0000.06310.89
5.2.80.0070.05711.14
5.2.70.0130.05011.12
5.2.60.0070.06010.90
5.2.50.0030.06011.09
5.2.40.0030.03011.04
5.2.30.0070.02310.89
5.2.20.0100.02710.80
5.2.10.0100.05310.71
5.2.00.0030.05310.79
5.1.60.0070.05010.02
5.1.50.0030.05010.02
5.1.40.0070.0439.86
5.1.30.0030.05010.34
5.1.20.0030.05710.42
5.1.10.0030.0439.90
5.1.00.0070.04710.07
5.0.50.0000.0508.58
5.0.40.0030.0338.45
5.0.30.0030.0608.23
5.0.20.0030.0378.23
5.0.10.0000.0438.27
5.0.00.0030.0338.24
4.4.90.0030.0338.23
4.4.80.0000.0308.23
4.4.70.0000.0338.23
4.4.60.0030.0338.23
4.4.50.0030.0338.23
4.4.40.0070.0378.23
4.4.30.0000.0338.23
4.4.20.0000.0278.23
4.4.10.0070.0308.23
4.4.00.0000.0408.23
4.3.110.0070.0308.23
4.3.100.0000.0378.23
4.3.90.0000.0208.23
4.3.80.0000.0278.23
4.3.70.0030.0278.23
4.3.60.0000.0278.23
4.3.50.0030.0208.23
4.3.40.0030.0338.23
4.3.30.0030.0238.23
4.3.20.0030.0178.23
4.3.10.0000.0378.23
4.3.00.0030.0238.23

preferences:
42.87 ms | 401 KiB | 5 Q