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\xFF\xFE", 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.70.0120.00616.75
8.3.60.0150.00318.68
8.3.50.0100.00621.97
8.3.40.0070.00718.70
8.3.30.0090.00618.80
8.3.20.0000.00818.91
8.3.10.0030.00620.30
8.3.00.0040.00421.73
8.2.180.0150.00016.63
8.2.170.0070.00722.96
8.2.160.0070.00720.43
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0100.00719.48
8.2.110.0030.00620.67
8.2.100.0090.00318.03
8.2.90.0000.00819.25
8.2.80.0000.00817.97
8.2.70.0100.00017.63
8.2.60.0060.00317.93
8.2.50.0000.00818.10
8.2.40.0030.00618.34
8.2.30.0000.01018.28
8.2.20.0060.00317.76
8.2.10.0040.00417.83
8.2.00.0040.00417.66
8.1.280.0070.01125.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.26
8.1.230.0080.00417.83
8.1.220.0060.00317.76
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00618.88
8.1.160.0060.00318.95
8.1.150.0030.00618.64
8.1.140.0000.00717.49
8.1.130.0070.00017.80
8.1.120.0040.00417.61
8.1.110.0000.00817.57
8.1.100.0070.00017.55
8.1.90.0040.00417.49
8.1.80.0030.00617.52
8.1.70.0050.00217.46
8.1.60.0000.00817.74
8.1.50.0060.00317.50
8.1.40.0040.00417.55
8.1.30.0040.00417.77
8.1.20.0000.00817.64
8.1.10.0080.00017.61
8.1.00.0000.00717.54
8.0.300.0070.00018.77
8.0.290.0040.00416.74
8.0.280.0040.00418.47
8.0.270.0050.00217.41
8.0.260.0030.00316.83
8.0.250.0070.00017.11
8.0.240.0030.00717.00
8.0.230.0030.00317.10
8.0.220.0030.00316.91
8.0.210.0040.00416.93
8.0.200.0000.00717.05
8.0.190.0070.00017.07
8.0.180.0020.00516.88
8.0.170.0050.00317.01
8.0.160.0030.00616.89
8.0.150.0070.00016.89
8.0.140.0030.00316.99
8.0.130.0000.00513.43
8.0.120.0030.00516.91
8.0.110.0070.00016.96
8.0.100.0000.00816.83
8.0.90.0000.00816.99
8.0.80.0090.00616.94
8.0.70.0000.00816.90
8.0.60.0000.00716.88
8.0.50.0050.00316.89
8.0.30.0070.01417.15
8.0.20.0100.00917.45
8.0.10.0040.00417.18
8.0.00.0130.01017.02
7.4.330.0080.00013.43
7.4.320.0030.00316.67
7.4.300.0000.00616.44
7.4.290.0070.00016.61
7.4.280.0040.00416.68
7.4.270.0030.00316.49
7.4.260.0030.00313.46
7.4.250.0040.00416.52
7.4.240.0080.00016.49
7.4.230.0070.00016.56
7.4.220.0210.00316.70
7.4.210.0050.00916.69
7.4.200.0000.00716.54
7.4.190.0000.00716.51
7.4.160.0080.00816.76
7.4.150.0150.00317.40
7.4.140.0090.00917.86
7.4.130.0070.01016.61
7.4.120.0070.01016.58
7.4.110.0170.00716.52
7.4.100.0100.01016.64
7.4.90.0140.00316.73
7.4.80.0070.01119.04
7.4.70.0030.01416.62
7.4.60.0000.01616.55
7.4.50.0040.00416.44
7.4.40.0070.00722.27
7.4.30.0030.01316.73
7.4.00.0030.01415.21
7.3.330.0020.00213.30
7.3.320.0030.00313.24
7.3.310.0000.00716.30
7.3.300.0000.00616.31
7.3.290.0030.01016.45
7.3.280.0010.01516.40
7.3.270.0000.01817.40
7.3.260.0130.00918.24
7.3.250.0090.01016.54
7.3.240.0030.01316.48
7.3.230.0110.00516.52
7.3.210.0060.01016.29
7.3.200.0140.00819.39
7.3.190.0120.00616.51
7.3.180.0100.00616.62
7.3.170.0090.00616.42
7.3.160.0060.00916.41
7.3.120.0040.00815.10
7.2.330.0130.01016.89
7.2.320.0130.01016.45
7.2.310.0080.00916.93
7.2.300.0120.00616.71
7.2.290.0070.01016.89
7.2.00.0090.00419.57
7.1.100.0040.01118.18
7.1.70.0000.01117.43
7.1.60.0040.00717.21
7.1.50.0060.01616.99
7.1.00.0070.05722.61
7.0.200.0100.00716.88
7.0.140.0030.07322.24
7.0.60.0070.08020.18
7.0.50.0130.07018.03
7.0.40.0100.06717.88
7.0.30.0170.07317.85
7.0.20.0130.07717.98
7.0.10.0130.07317.80
7.0.00.0000.04717.88
5.6.280.0000.07321.07
5.6.210.0030.08720.66
5.6.200.0100.07718.28
5.6.190.0000.08318.25
5.6.180.0130.07718.31
5.6.170.0070.08018.31
5.6.160.0070.04018.33
5.6.150.0070.03718.38
5.6.140.0170.06018.21
5.6.130.0030.08318.31
5.6.120.0030.08018.40
5.6.110.0100.08018.37
5.6.100.0070.05718.27
5.6.90.0030.09018.25
5.6.80.0100.07317.70
5.6.70.0130.07017.79
5.6.60.0030.08017.78
5.6.50.0070.07717.63
5.6.40.0030.04017.58
5.6.30.0070.04317.70
5.6.20.0100.06717.69
5.6.10.0070.07017.70
5.6.00.0100.07317.56
5.5.350.0170.08320.59
5.5.340.0130.07018.14
5.5.330.0030.08018.14
5.5.320.0100.05018.04
5.5.310.0030.08718.16
5.5.300.0100.07318.21
5.5.290.0030.06018.07
5.5.280.0070.05318.20
5.5.270.0070.06718.06
5.5.260.0030.08718.06
5.5.250.0070.08317.93
5.5.240.0070.07317.54
5.5.230.0100.07317.52
5.5.220.0030.08017.39
5.5.210.0030.04717.41
5.5.200.0070.04017.56
5.5.190.0100.07317.47
5.5.180.0070.06317.46
5.5.160.0100.05017.39
5.5.150.0070.07017.45
5.5.140.0100.07317.43
5.5.130.0230.03717.43
5.5.120.0000.05317.43
5.5.110.0100.07717.56
5.5.100.0070.05017.34
5.5.90.0070.04017.30
5.5.80.0170.06717.36
5.5.70.0170.03317.36
5.5.60.0100.06017.35
5.5.50.0030.04717.32
5.5.40.0070.05017.36
5.5.30.0030.04717.35
5.5.20.0030.07717.38
5.5.10.0070.04717.35
5.5.00.0070.06017.31
5.4.450.0000.08019.38
5.4.440.0130.04019.32
5.4.430.0070.06319.36
5.4.420.0130.07019.38
5.4.410.0100.07319.46
5.4.400.0170.05319.13
5.4.390.0100.07718.95
5.4.380.0070.07018.96
5.4.370.0070.07319.05
5.4.360.0130.06018.98
5.4.350.0100.04719.10
5.4.340.0100.07319.05
5.4.320.0100.05019.01
5.4.310.0100.07019.05
5.4.300.0130.07319.27
5.4.290.0070.07319.03
5.4.280.0130.05719.09
5.4.270.0130.07019.03
5.4.260.0100.07319.01
5.4.250.0170.03718.98
5.4.240.0030.06319.07
5.4.230.0100.05019.01
5.4.220.0130.07318.88
5.4.210.0100.04319.26
5.4.200.0070.04318.99
5.4.190.0070.06018.94
5.4.180.0000.05718.87
5.4.170.0030.08319.25
5.4.160.0070.08318.98
5.4.150.0100.06718.86
5.4.140.0030.05016.47
5.4.130.0030.04016.45
5.4.120.0030.03716.35
5.4.110.0000.04016.54
5.4.100.0170.06316.50
5.4.90.0070.04016.64
5.4.80.0030.05016.44
5.4.70.0100.06716.44
5.4.60.0030.06016.43
5.4.50.0100.05016.42
5.4.40.0130.04016.38
5.4.30.0030.08016.40
5.4.20.0100.05016.40
5.4.10.0000.05016.34
5.4.00.0000.07315.75
5.3.290.0030.08014.68
5.3.280.0070.07714.70
5.3.270.0100.04014.68
5.3.260.0030.05314.67
5.3.250.0070.05714.64
5.3.240.0000.04314.66
5.3.230.0070.04714.67
5.3.220.0000.04314.62
5.3.210.0070.03314.57
5.3.200.0030.05314.67
5.3.190.0070.03714.59
5.3.180.0030.07314.58
5.3.170.0130.03014.59
5.3.160.0030.08314.57
5.3.150.0070.07314.55
5.3.140.0070.03314.63
5.3.130.0100.07014.51
5.3.120.0070.05014.63
5.3.110.0030.07314.61
5.3.100.0000.04014.08
5.3.90.0130.06714.09
5.3.80.0100.05713.86
5.3.70.0030.07013.97
5.3.60.0030.05714.22
5.3.50.0100.07314.02
5.3.40.0070.06313.98
5.3.30.0030.06013.94
5.3.20.0170.06313.81
5.3.10.0070.07313.56
5.3.00.0170.06713.70
5.2.170.0030.03011.14
5.2.160.0030.03311.04
5.2.150.0030.04711.09
5.2.140.0130.05011.07
5.2.130.0030.06710.88
5.2.120.0070.06011.10
5.2.110.0000.06011.24
5.2.100.0000.03310.93
5.2.90.0000.06011.01
5.2.80.0030.04311.06
5.2.70.0030.03011.01
5.2.60.0070.06311.02
5.2.50.0070.04010.93
5.2.40.0000.03310.97
5.2.30.0030.03010.94
5.2.20.0130.05310.99
5.2.10.0070.03010.80
5.2.00.0100.05310.75
5.1.60.0070.02010.00
5.1.50.0000.03710.04
5.1.40.0030.0509.99
5.1.30.0070.04310.38
5.1.20.0030.05310.33
5.1.10.0130.05010.09
5.1.00.0070.05010.14
5.0.50.0070.0378.68
5.0.40.0030.0208.35
5.0.30.0000.0338.16
5.0.20.0000.0208.28
5.0.10.0030.0178.26
5.0.00.0070.0278.14
4.4.90.0000.0407.46
4.4.80.0070.0237.46
4.4.70.0070.0337.46
4.4.60.0030.0307.46
4.4.50.0000.0237.46
4.4.40.0000.0277.46
4.4.30.0030.0377.46
4.4.20.0000.0277.46
4.4.10.0000.0377.46
4.4.00.0000.0437.46
4.3.110.0000.0177.46
4.3.100.0000.0177.46
4.3.90.0030.0137.46
4.3.80.0030.0237.46
4.3.70.0030.0137.46
4.3.60.0000.0137.46
4.3.50.0000.0137.46
4.3.40.0000.0237.46
4.3.30.0000.0177.46
4.3.20.0030.0137.46
4.3.10.0000.0137.46
4.3.00.0000.0137.46

preferences:
51.32 ms | 401 KiB | 5 Q