3v4l.org

run code in 300+ PHP versions simultaneously
<?php const INT_SIGNED = 1; const INT_LE = 2; function isLittleEndian() { return pack('S', 0x00FF) === "\xFF\x00"; } function is32Bit() { return PHP_INT_MAX < 0x80000000; } 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)); if (($result & 0x80000000) && ($flags & INT_SIGNED) && !is32Bit()) { $result = 0xFFFFFFFF00000000 | $result; } return $result; } var_dump(isLittleEndian(), is32Bit(), unpack_int32("\xFF\xFF\xFE\xFF", INT_SIGNED));

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.0160.00316.63
8.3.50.0170.01122.01
8.3.40.0040.01118.79
8.3.30.0110.00419.22
8.3.20.0040.00420.27
8.3.10.0060.00323.70
8.3.00.0050.00220.68
8.2.180.0180.00416.63
8.2.170.0070.00722.96
8.2.160.0030.01022.13
8.2.150.0120.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0030.00622.21
8.2.110.0090.00022.31
8.2.100.0100.00318.03
8.2.90.0040.00419.35
8.2.80.0060.00317.97
8.2.70.0090.00017.63
8.2.60.0080.00018.02
8.2.50.0050.00318.07
8.2.40.0040.00419.31
8.2.30.0040.00418.18
8.2.20.0000.00817.70
8.2.10.0040.00419.45
8.2.00.0040.00417.75
8.1.280.0180.00025.92
8.1.270.0040.01124.01
8.1.260.0090.00326.35
8.1.250.0070.01028.09
8.1.240.0090.00023.81
8.1.230.0040.00719.15
8.1.220.0060.00317.78
8.1.210.0000.00818.77
8.1.200.0030.00617.34
8.1.190.0000.00917.51
8.1.180.0000.00818.10
8.1.170.0050.00318.64
8.1.160.0080.00022.07
8.1.150.0000.00818.75
8.1.140.0040.00417.52
8.1.130.0000.00717.94
8.1.120.0000.01117.60
8.1.110.0090.00017.52
8.1.100.0040.00317.42
8.1.90.0000.00717.53
8.1.80.0030.00317.55
8.1.70.0030.00517.55
8.1.60.0000.00817.65
8.1.50.0030.00617.59
8.1.40.0040.00417.64
8.1.30.0000.00917.63
8.1.20.0000.00917.66
8.1.10.0000.00817.65
8.1.00.0000.00817.55
8.0.300.0070.00018.77
8.0.290.0060.00317.43
8.0.280.0030.00318.55
8.0.270.0030.00317.28
8.0.260.0030.00316.92
8.0.250.0000.00717.05
8.0.240.0060.00316.95
8.0.230.0030.00317.10
8.0.220.0000.00717.05
8.0.210.0070.00016.85
8.0.200.0000.00717.05
8.0.190.0000.00717.03
8.0.180.0060.00317.02
8.0.170.0050.00317.09
8.0.160.0000.00816.95
8.0.150.0030.00316.83
8.0.140.0040.00416.92
8.0.130.0000.00513.51
8.0.120.0020.00516.97
8.0.110.0020.00517.04
8.0.100.0070.00016.82
8.0.90.0070.00016.85
8.0.80.0110.00417.00
8.0.70.0000.00817.02
8.0.60.0070.00016.88
8.0.50.0040.00417.11
8.0.30.0090.00917.31
8.0.20.0100.00917.48
8.0.10.0040.00417.13
8.0.00.0080.01016.98
7.4.330.0000.00515.15
7.4.320.0060.00016.60
7.4.300.0030.00316.68
7.4.290.0070.00016.73
7.4.280.0070.00316.59
7.4.270.0000.00716.57
7.4.260.0040.00416.56
7.4.250.0020.00516.63
7.4.240.0000.00816.65
7.4.230.0000.00716.79
7.4.220.0090.00916.60
7.4.210.0060.01016.68
7.4.200.0030.00316.70
7.4.190.0000.00816.57
7.4.160.0070.01016.45
7.4.150.0070.01017.40
7.4.140.0140.00517.86
7.4.130.0100.00916.55
7.4.120.0120.00516.57
7.4.110.0130.00316.70
7.4.100.0090.01216.42
7.4.90.0060.01216.68
7.4.80.0130.00616.57
7.4.70.0000.01716.56
7.4.60.0100.00716.48
7.4.50.0040.00416.43
7.4.40.0070.00722.77
7.4.30.0210.00016.52
7.4.10.0110.00714.93
7.4.00.0010.01515.10
7.3.330.0000.00613.43
7.3.320.0050.00013.51
7.3.310.0080.00016.33
7.3.300.0000.00716.29
7.3.290.0120.00316.38
7.3.280.0100.00816.42
7.3.270.0100.00617.40
7.3.260.0090.01316.71
7.3.250.0110.00916.43
7.3.240.0140.00816.50
7.3.230.0140.00316.49
7.3.210.0160.00416.55
7.3.200.0070.01119.39
7.3.190.0170.00016.73
7.3.180.0120.00916.62
7.3.170.0130.00316.47
7.3.160.0090.00616.36
7.3.130.0070.01014.88
7.3.120.0090.00914.82
7.3.110.0070.01214.93
7.3.100.0140.00214.86
7.3.90.0100.00714.93
7.3.80.0050.01115.06
7.3.70.0090.00414.70
7.3.60.0020.01014.96
7.3.50.0030.00714.83
7.3.40.0030.00915.05
7.3.30.0050.00814.90
7.3.20.0050.01016.72
7.3.10.0060.00716.71
7.3.00.0070.00816.79
7.2.330.0040.01416.63
7.2.320.0060.01216.75
7.2.310.0120.00616.78
7.2.300.0070.01316.92
7.2.290.0060.00916.81
7.2.260.0070.01315.17
7.2.250.0120.00615.04
7.2.240.0060.01115.11
7.2.230.0070.01015.01
7.2.220.0030.01115.31
7.2.210.0050.01115.04
7.2.200.0070.00715.28
7.2.190.0110.00515.05
7.2.180.0030.01115.27
7.2.170.0080.00515.01
7.2.160.0090.00615.21
7.2.150.0060.00616.76
7.2.140.0050.00516.96
7.2.130.0000.01517.10
7.2.120.0080.00316.85
7.2.110.0120.00317.05
7.2.100.0030.00817.14
7.2.90.0090.01116.87
7.2.80.0090.00617.15
7.2.70.0070.01016.95
7.2.60.0060.00716.93
7.2.50.0090.00617.04
7.2.40.0040.00816.95
7.2.30.0030.00617.08
7.2.20.0070.00716.92
7.2.10.0040.01117.04
7.2.00.0110.01118.05
7.1.330.0080.00715.92
7.1.320.0110.00415.86
7.1.310.0080.00315.99
7.1.300.0120.00415.85
7.1.290.0050.00715.83
7.1.280.0030.00915.78
7.1.270.0070.00615.95
7.1.260.0060.00815.84
7.1.250.0000.01415.89
7.1.240.0000.01215.86
7.1.230.0060.00615.61
7.1.220.0100.00615.77
7.1.210.0050.00516.00
7.1.200.0040.01015.84
7.1.190.0070.01115.76
7.1.180.0030.00915.87
7.1.170.0000.01116.00
7.1.160.0080.00615.96
7.1.150.0030.00915.75
7.1.140.0060.00915.98
7.1.130.0040.01115.93
7.1.120.0030.01015.77
7.1.110.0030.01015.95
7.1.100.0040.00817.16
7.1.90.0060.00915.73
7.1.80.0060.00915.84
7.1.70.0020.00916.52
7.1.60.0100.01017.66
7.1.50.0060.00916.26
7.1.40.0060.00615.86
7.1.30.0000.01415.97
7.1.20.0060.00615.96
7.1.10.0000.00915.93
7.1.00.0090.03619.12
7.0.330.0000.01115.30
7.0.320.0000.01515.56
7.0.310.0070.00715.48
7.0.300.0000.01215.08
7.0.290.0070.00715.28
7.0.280.0090.00015.08
7.0.270.0030.00715.47
7.0.260.0000.01515.21
7.0.250.0040.00715.56
7.0.240.0140.00015.68
7.0.230.0000.00915.37
7.0.220.0030.01315.37
7.0.210.0060.01015.48
7.0.200.0050.00816.19
7.0.190.0030.00715.47
7.0.180.0000.01415.37
7.0.170.0040.00815.54
7.0.160.0000.01315.60
7.0.150.0040.01115.44
7.0.140.0110.03518.78
7.0.130.0030.00615.53
7.0.120.0030.01015.37
7.0.110.0040.01115.59
7.0.100.0340.04417.74
7.0.90.0180.02917.73
7.0.80.0280.03817.79
7.0.70.0330.03717.79
7.0.60.0310.04117.75
7.0.50.0320.04217.83
7.0.40.0080.04316.91
7.0.30.0070.04616.96
7.0.20.0070.04716.71
7.0.10.0030.04716.92
7.0.00.0090.04416.85
5.6.400.0030.00714.18
5.6.390.0050.00514.59
5.6.380.0090.00614.34
5.6.370.0080.00614.45
5.6.360.0060.00314.31
5.6.350.0100.00314.76
5.6.340.0030.01014.61
5.6.330.0060.00914.21
5.6.320.0040.00814.45
5.6.310.0070.01014.44
5.6.300.0070.00313.91
5.6.290.0090.00614.45
5.6.280.0080.03617.59
5.6.270.0060.00614.53
5.6.260.0060.00314.41
5.6.250.0010.05117.51
5.6.240.0050.04417.69
5.6.230.0080.04617.60
5.6.220.0080.04217.42
5.6.210.0070.03217.61
5.6.200.0060.04517.81
5.6.190.0080.04317.92
5.6.180.0070.04317.78
5.6.170.0070.04017.70
5.6.160.0080.04817.74
5.6.150.0050.03217.82
5.6.140.0070.04517.71
5.6.130.0100.04717.73
5.6.120.0050.04717.85
5.6.110.0060.04517.72
5.6.100.0120.03917.70
5.6.90.0130.03817.79
5.6.80.0030.04217.49
5.6.70.0070.02717.45
5.6.60.0120.03717.50
5.6.50.0040.03217.35
5.6.40.0050.04417.38
5.6.30.0100.04317.34
5.6.20.0110.04117.63
5.6.10.0020.03417.38
5.6.00.0160.03617.31
5.5.380.0050.03117.31
5.5.370.0080.04017.42
5.5.360.0100.04217.37
5.5.350.0030.04817.39
5.5.340.0080.04017.45
5.5.330.0130.03817.69
5.5.320.0040.04617.56
5.5.310.0050.03517.75
5.5.300.0080.04317.65
5.5.290.0040.04817.62
5.5.280.0110.04417.73
5.5.270.0070.04517.48
5.5.260.0140.04317.51
5.5.250.0130.04417.47
5.5.240.0080.03817.38
5.5.230.0040.04417.38
5.5.220.0100.03917.24
5.5.210.0030.04217.25
5.5.200.0030.04417.15
5.5.190.0070.04017.24
5.5.180.0080.04417.17
5.5.170.0040.00714.11
5.5.160.0080.04117.26
5.5.150.0070.04517.21
5.5.140.0070.04717.20
5.5.130.0080.04017.16
5.5.120.0110.03917.16
5.5.110.0030.03317.24
5.5.100.0090.03517.12
5.5.90.0130.03517.16
5.5.80.0080.03917.08
5.5.70.0050.04017.16
5.5.60.0050.04417.00
5.5.50.0080.04017.12
5.5.40.0020.04017.19
5.5.30.0070.04017.30
5.5.20.0080.04317.24
5.5.10.0050.04317.20
5.5.00.0060.03816.95
5.4.450.0090.02415.76
5.4.440.0080.03515.70
5.4.430.0050.04615.68
5.4.420.0100.04215.62
5.4.410.0090.03515.65
5.4.400.0070.03515.57
5.4.390.0020.03215.55
5.4.380.0080.04215.48
5.4.370.0050.04515.53
5.4.360.0080.04215.49
5.4.350.0100.04015.50
5.4.340.0030.04715.53
5.4.330.0000.01012.01
5.4.320.0030.04715.57
5.4.310.0150.03315.55
5.4.300.0020.04315.62
5.4.290.0020.03515.59
5.4.280.0070.03315.52
5.4.270.0050.03715.46
5.4.260.0070.03715.53
5.4.250.0030.03715.43
5.4.240.0050.02215.47
5.4.230.0080.03315.57
5.4.220.0000.03815.44
5.4.210.0080.03815.53
5.4.200.0120.03315.53
5.4.190.0080.04315.53
5.4.180.0030.04115.44
5.4.170.0030.02915.52
5.4.160.0030.04215.56
5.4.150.0050.04515.58
5.4.140.0080.03914.24
5.4.130.0100.03514.12
5.4.120.0020.04214.26
5.4.110.0080.03714.20
5.4.100.0030.04314.25
5.4.90.0100.03514.23
5.4.80.0040.03814.19
5.4.70.0060.03814.24
5.4.60.0070.03814.17
5.4.50.0060.03914.16
5.4.40.0080.02314.24
5.4.30.0030.03814.25
5.4.20.0030.03314.17
5.4.10.0020.04114.16
5.4.00.0030.03913.94
5.3.290.0090.02713.38
5.3.280.0020.03413.35
5.3.270.0030.03813.30
5.3.260.0050.04413.35
5.3.250.0020.04013.33
5.3.240.0040.03913.34
5.3.230.0040.02713.34
5.3.220.0070.03913.35
5.3.210.0050.04213.34
5.3.200.0030.03813.28
5.3.190.0030.03813.33
5.3.180.0050.02613.32
5.3.170.0030.02313.26
5.3.160.0070.03813.27
5.3.150.0050.02813.29
5.3.140.0050.04213.30
5.3.130.0030.04013.31
5.3.120.0080.04013.25
5.3.110.0060.02313.27
5.3.100.0020.04013.00
5.3.90.0050.04013.01
5.3.80.0040.03413.01
5.3.70.0050.03912.98
5.3.60.0070.03512.96
5.3.50.0030.04012.97
5.3.40.0070.03212.99
5.3.30.0050.04212.95
5.3.20.0080.04112.81
5.3.10.0080.03512.88
5.3.00.0030.03912.79
5.2.170.0070.05011.14
5.2.160.0100.04011.10
5.2.150.0030.07011.09
5.2.140.0030.06011.00
5.2.130.0100.05010.92
5.2.120.0030.06011.14
5.2.110.0100.05710.95
5.2.100.0000.06710.94
5.2.90.0100.06310.96
5.2.80.0030.06311.09
5.2.70.0030.06311.09
5.2.60.0100.05711.07
5.2.50.0030.06011.00
5.2.40.0070.05310.79
5.2.30.0030.06311.04
5.2.20.0000.07011.03
5.2.10.0100.04710.81
5.2.00.0030.06310.77
5.1.60.0070.04710.58
5.1.50.0000.04310.58
5.1.40.0070.05310.58
5.1.30.0130.04310.58
5.1.20.0030.06310.58
5.1.10.0030.03710.58
5.1.00.0030.05710.58
5.0.50.0030.04710.58
5.0.40.0030.03310.58
5.0.30.0030.05310.58
5.0.20.0070.04010.58
5.0.10.0030.04010.58
5.0.00.0000.07010.58
4.4.90.0030.03310.58
4.4.80.0000.03710.58
4.4.70.0000.04010.58
4.4.60.0030.03310.58
4.4.50.0070.02710.58
4.4.40.0030.05310.58
4.4.30.0100.02710.58
4.4.20.0030.02310.58
4.4.10.0030.03310.58
4.4.00.0070.05010.58
4.3.110.0000.04010.58
4.3.100.0070.03010.58
4.3.90.0030.03310.58
4.3.80.0070.05310.58
4.3.70.0100.02710.58
4.3.60.0000.02710.58
4.3.50.0000.03310.58
4.3.40.0030.05010.58
4.3.30.0070.03010.58
4.3.20.0070.02310.58
4.3.10.0000.03710.58
4.3.00.0000.03710.58

preferences:
40.27 ms | 401 KiB | 5 Q