3v4l.org

run code in 300+ PHP versions simultaneously
<?php function strToHex($string) { $hex=''; for ($i=0; $i < strlen($string); $i++) { $hex .= dechex(ord($string[$i])); } return $hex; } function hexToStr($hex) { $string=''; for ($i=2; $i < strlen($hex)-1; $i+=2) { $string .= chr(hexdec($hex[$i].$hex[$i+1])); } return $string; } $test = "ffff:eeee:dddd:cccc:bbbb:aaaa:9999:8888"; $testParts = explode(':', $test); $testHex = array(); foreach($testParts as $testPart){ array_push($testHex, strToHex($testPart)); } $packed = pack('nvc*', $testHex[0], $testHex[1], $testHex[2], $testHex[3], $testHex[4], $testHex[5], $testHex[6], $testHex[7]); $unpacked = unpack('nvc*', $packed); $unpackedString = array(); foreach($unpacked as $unpack){ array_push($unpackedString, $unpack); } echo implode(':', $unpackedString); ?>

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.0060.00918.68
8.3.50.0070.01421.99
8.3.40.0120.00318.84
8.3.30.0030.01420.34
8.3.20.0070.00020.34
8.3.10.0040.00422.09
8.3.00.0040.00422.58
8.2.180.0150.00716.63
8.2.170.0000.01522.96
8.2.160.0120.00320.21
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0060.01326.16
8.2.120.0050.00319.38
8.2.110.0100.00022.25
8.2.100.0130.00017.76
8.2.90.0070.00019.30
8.2.80.0000.00719.21
8.2.70.0040.00417.75
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0080.00018.03
8.2.30.0030.00618.12
8.2.20.0000.00717.61
8.2.10.0040.00417.68
8.2.00.0000.00717.82
8.1.280.0070.01025.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00422.10
8.1.230.0040.00719.04
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0000.00817.35
8.1.190.0050.00217.52
8.1.180.0030.00518.88
8.1.170.0090.00018.62
8.1.160.0000.00718.82
8.1.150.0000.00818.59
8.1.140.0070.00017.37
8.1.130.0070.00017.80
8.1.120.0050.00317.39
8.1.110.0000.00817.46
8.1.100.0000.00817.46
8.1.90.0070.00017.42
8.1.80.0050.00317.44
8.1.70.0040.00417.47
8.1.60.0040.00417.55
8.1.50.0040.00417.43
8.1.40.0000.00817.57
8.1.30.0040.00417.56
8.1.20.0040.00417.73
8.1.10.0090.00017.50
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0070.00017.16
8.0.280.0000.00718.46
8.0.270.0040.00417.18
8.0.260.0070.00016.83
8.0.250.0040.00416.91
8.0.240.0040.00417.00
8.0.230.0000.00716.96
8.0.220.0070.00016.77
8.0.210.0070.00016.84
8.0.200.0000.00716.94
8.0.190.0040.00416.88
8.0.180.0040.00416.81
8.0.170.0040.00416.96
8.0.160.0040.00416.91
8.0.150.0000.00716.86
8.0.140.0000.00716.85
8.0.130.0030.00313.33
8.0.120.0080.00016.89
8.0.110.0060.00316.86
8.0.100.0040.00416.72
8.0.90.0000.00816.73
8.0.80.0000.01516.91
8.0.70.0070.00016.69
8.0.60.0040.00416.82
8.0.50.0040.00416.85
8.0.30.0110.00817.07
8.0.20.0030.01517.40
8.0.10.0000.00716.93
8.0.00.0130.00616.71
7.4.330.0060.00015.00
7.4.320.0040.00416.63
7.4.300.0000.00616.65
7.4.290.0000.01116.54
7.4.280.0070.00016.45
7.4.270.0030.00316.54
7.4.260.0000.00713.27
7.4.250.0070.00016.58
7.4.240.0030.00316.62
7.4.230.0030.00316.51
7.4.220.0110.01116.62
7.4.210.0060.00816.62
7.4.200.0040.00416.63
7.4.190.0000.00816.77
7.4.160.0150.00716.49
7.4.150.0040.01317.40
7.4.140.0100.01017.86
7.4.130.0130.00416.57
7.4.120.0100.00716.47
7.4.110.0070.01916.51
7.4.100.0130.00316.61
7.4.90.0090.00916.68
7.4.80.0080.00919.39
7.4.70.0070.01016.39
7.4.60.0070.01016.62
7.4.50.0080.00016.56
7.4.40.0100.00722.77
7.4.30.0100.01516.27
7.4.10.0070.01114.87
7.4.00.0090.00814.89
7.3.330.0000.00513.31
7.3.320.0050.00013.31
7.3.310.0070.00016.48
7.3.300.0000.00716.39
7.3.290.0070.01016.31
7.3.280.0070.01016.38
7.3.270.0120.00917.40
7.3.260.0100.01016.43
7.3.250.0130.00516.42
7.3.240.0130.00316.48
7.3.230.0070.01016.39
7.3.210.0140.00316.57
7.3.200.0140.00319.39
7.3.190.0080.00816.43
7.3.180.0110.00616.43
7.3.170.0060.01016.56
7.3.160.0120.00416.45
7.3.130.0130.00314.82
7.3.120.0060.01114.85
7.3.110.0080.01014.91
7.3.100.0100.00514.93
7.3.90.0020.01014.82
7.3.80.0050.00914.88
7.3.70.0070.00714.84
7.3.60.0070.00614.83
7.3.50.0070.00814.80
7.3.40.0070.00614.80
7.3.30.0070.00614.89
7.3.20.0060.00916.59
7.3.10.0070.00516.72
7.3.00.0050.00716.64
7.2.330.0140.00716.82
7.2.320.0080.01216.61
7.2.310.0110.00716.43
7.2.300.0000.01716.43
7.2.290.0030.01316.51
7.2.260.0030.01314.90
7.2.250.0060.01314.98
7.2.240.0070.01215.02
7.2.230.0050.01114.97
7.2.220.0080.00615.18
7.2.210.0080.00515.11
7.2.200.0050.00915.04
7.2.190.0050.00914.97
7.2.180.0060.00815.10
7.2.170.0040.01215.07
7.2.160.0060.01015.03
7.2.150.0060.00917.01
7.2.140.0060.00616.98
7.2.130.0080.00816.84
7.2.120.0040.00416.98
7.2.110.0060.00616.65
7.2.100.0060.00616.68
7.2.90.0030.01017.03
7.2.80.0030.01016.80
7.2.70.0030.00716.94
7.2.60.0060.00616.79
7.2.50.0040.01417.13
7.2.40.0060.00917.01
7.2.30.0070.01017.07
7.2.20.0070.01116.79
7.2.10.0040.00717.07
7.2.00.0090.00617.14
7.1.330.0040.00915.76
7.1.320.0070.00515.83
7.1.310.0060.00715.86
7.1.300.0040.01015.77
7.1.290.0040.00915.76
7.1.280.0090.00615.75
7.1.270.0070.00715.85
7.1.260.0040.01015.70
7.1.250.0060.00615.82
7.1.240.0000.01115.88
7.1.230.0000.01515.84
7.1.220.0060.00915.71
7.1.210.0000.01415.92
7.1.200.0030.00815.92
7.1.190.0090.00615.88
7.1.180.0000.01415.86
7.1.170.0000.01115.95
7.1.160.0070.00715.57
7.1.150.0040.01115.95
7.1.140.0030.01015.91
7.1.130.0030.00915.90
7.1.120.0090.00415.94
7.1.110.0000.00915.61
7.1.100.0000.01315.65
7.1.90.0030.01315.69
7.1.80.0040.01115.55
7.1.70.0040.00716.50
7.1.60.0090.01117.58
7.1.50.0070.00716.20
7.1.40.0040.00715.93
7.1.30.0000.01315.69
7.1.20.0070.00715.98
7.1.10.0060.00615.84
7.1.00.0060.01819.20
7.0.330.0040.00715.50
7.0.320.0030.00915.53
7.0.310.0070.00715.20
7.0.300.0100.00715.37
7.0.290.0000.01215.22
7.0.280.0040.01215.49
7.0.270.0000.01615.47
7.0.260.0040.00815.45
7.0.250.0030.01015.11
7.0.240.0030.01015.41
7.0.230.0060.01215.54
7.0.220.0080.00415.38
7.0.210.0130.00015.46
7.0.200.0080.00515.25
7.0.190.0000.01415.27
7.0.180.0000.00815.49
7.0.170.0030.01015.60
7.0.160.0030.01015.53
7.0.150.0040.00715.47
7.0.140.0030.04218.79
7.0.130.0070.01015.48
7.0.120.0120.00315.54
7.0.110.0060.00615.39
7.0.100.0040.00815.55
7.0.90.0070.00415.50
7.0.80.0130.00015.32
7.0.70.0070.01015.62
7.0.60.0050.04417.67
7.0.50.0070.02716.66
7.0.40.0030.05116.67
7.0.30.0180.04416.67
7.0.20.0170.03516.79
7.0.10.0280.03216.89
7.0.00.0080.03216.86
5.6.400.0090.00614.42
5.6.390.0040.00714.29
5.6.380.0060.00914.73
5.6.370.0120.00314.28
5.6.360.0090.00614.40
5.6.350.0040.00714.55
5.6.340.0070.01014.60
5.6.330.0060.01014.33
5.6.320.0040.01114.31
5.6.310.0100.00014.55
5.6.300.0130.00014.38
5.6.290.0000.01114.33
5.6.280.0050.04217.82
5.6.270.0060.00914.46
5.6.260.0030.00714.55
5.6.250.0000.00814.23
5.6.240.0060.00914.32
5.6.230.0110.00714.27
5.6.220.0060.01014.48
5.6.210.0050.03817.49
5.6.200.0050.02516.33
5.6.190.0080.04017.35
5.6.180.0190.02917.34
5.6.170.0100.02917.56
5.6.160.0030.02917.39
5.6.150.0050.03516.34
5.6.140.0100.02816.36
5.6.130.0080.04116.26
5.6.120.0120.04317.76
5.6.110.0070.04417.63
5.6.100.0020.02717.61
5.6.90.0100.04117.71
5.6.80.0050.03617.43
5.6.70.0040.01214.25
5.6.60.0120.00314.10
5.6.50.0040.01114.20
5.6.40.0030.01014.21
5.6.30.0080.00314.30
5.6.20.0060.00814.39
5.6.10.0000.01214.30
5.6.00.0100.00714.58
5.5.380.0000.01514.41
5.5.370.0040.01214.28
5.5.360.0080.00314.39
5.5.350.0030.04217.41
5.5.340.0050.04016.16
5.5.330.0080.03117.21
5.5.320.0230.03517.45
5.5.310.0190.03517.29
5.5.300.0110.04016.33
5.5.290.0060.03316.25
5.5.280.0070.02717.62
5.5.270.0140.02317.53
5.5.260.0070.02517.49
5.5.250.0060.02517.64
5.5.240.0130.02017.17
5.5.230.0000.01414.39
5.5.220.0130.00314.28
5.5.210.0060.01014.32
5.5.200.0090.00614.32
5.5.190.0030.01014.21
5.5.180.0070.00314.44
5.5.170.0000.01114.41
5.5.160.0120.00614.31
5.5.150.0090.00614.37
5.5.140.0060.00614.48
5.5.130.0040.00814.07
5.5.120.0090.00914.25
5.5.110.0130.00314.11
5.5.100.0110.00414.07
5.5.90.0000.01514.05
5.5.80.0040.00714.08
5.5.70.0090.00614.21
5.5.60.0040.01114.55
5.5.50.0120.00614.48
5.5.40.0030.01514.34
5.5.30.0070.00714.39
5.5.20.0080.00314.27
5.5.10.0030.01014.09
5.5.00.0060.01014.38
5.4.450.0110.03315.25
5.4.440.0170.02715.35
5.4.430.0140.02015.41
5.4.420.0130.02015.12
5.4.410.0100.02515.32
5.4.400.0130.01915.28
5.4.390.0120.02215.13
5.4.380.0080.02315.07
5.4.370.0110.02015.00
5.4.360.0130.02015.30
5.4.350.0130.01815.10
5.4.340.0070.02915.20
5.4.330.0080.00511.16
5.4.320.0100.02414.95
5.4.310.0170.01814.99
5.4.300.0150.01915.12
5.4.290.0100.02115.04
5.4.280.0090.02415.17
5.4.270.0180.03115.06
5.4.260.0120.02414.98
5.4.250.0150.02814.94
5.4.240.0150.03815.03
5.4.230.0180.03714.94
5.4.220.0200.02314.90
5.4.210.0120.02015.12
5.4.200.0140.02515.05
5.4.190.0170.04015.04
5.4.180.0140.01815.13
5.4.170.0120.02815.12
5.4.160.0180.03515.00
5.4.150.0100.02815.15
5.4.140.0160.03913.78
5.4.130.0180.02913.64
5.4.120.0160.02613.78
5.4.110.0200.04113.68
5.4.100.0170.02013.80
5.4.90.0190.03613.78
5.4.80.0170.03413.80
5.4.70.0240.02013.64
5.4.60.0100.03213.69
5.4.50.0160.02613.62
5.4.40.0160.03613.76
5.4.30.0180.03213.74
5.4.20.0250.03013.81
5.4.10.0150.02613.65
5.4.00.0130.03313.41
5.3.290.0110.02612.71
5.3.280.0130.03512.63
5.3.270.0170.02412.58
5.3.260.0170.03312.63
5.3.250.0150.03512.77
5.3.240.0140.02412.58
5.3.230.0160.03312.66
5.3.220.0180.03612.61
5.3.210.0200.03612.57
5.3.200.0160.03112.62
5.3.190.0140.04112.53
5.3.180.0150.02312.61
5.3.170.0180.03512.58
5.3.160.0150.03612.52
5.3.150.0170.03912.61
5.3.140.0080.03812.59
5.3.130.0180.03712.60
5.3.120.0130.03312.57
5.3.110.0220.03512.55
5.3.100.0210.03812.39
5.3.90.0150.04012.40
5.3.80.0130.04012.30
5.3.70.0200.03712.25
5.3.60.0120.03012.33
5.3.50.0170.04012.23
5.3.40.0180.02312.27
5.3.30.0230.03112.35
5.3.20.0130.02312.14
5.3.10.0130.03612.10
5.3.00.0170.03612.16
5.2.170.0270.04712.37
5.2.160.0200.06012.37
5.2.150.0170.06012.37
5.2.140.0230.03712.37
5.2.130.0230.03312.37
5.2.120.0230.05712.37
5.2.110.0170.05712.37
5.2.100.0230.05712.37
5.2.90.0230.04012.37
5.2.80.0270.04712.37
5.2.70.0230.05712.37
5.2.60.0300.04312.37
5.2.50.0230.05712.37
5.2.40.0130.05712.37
5.2.30.0200.05712.37
5.2.20.0230.05712.37
5.2.10.0200.03012.37
5.2.00.0270.05012.37
5.1.60.0170.03712.37
5.1.50.0200.04012.37
5.1.40.0270.04712.37
5.1.30.0200.05312.37
5.1.20.0170.05012.37
5.1.10.0200.05712.37
5.1.00.0270.03312.37
5.0.50.0100.03712.37
5.0.40.0130.03712.37
5.0.30.0070.05712.37
5.0.20.0100.04312.37
5.0.10.0200.03012.37
5.0.00.0170.03712.37
4.4.90.0100.03712.37
4.4.80.0100.02712.37
4.4.70.0070.03712.37
4.4.60.0130.02012.37
4.4.50.0100.02012.37
4.4.40.0100.03712.37
4.4.30.0100.03712.37
4.4.20.0070.02012.37
4.4.10.0130.03312.37
4.4.00.0100.04012.37
4.3.110.0070.03312.37
4.3.100.0100.01312.37
4.3.90.0170.03012.37
4.3.80.0130.04712.37
4.3.70.0100.03012.37
4.3.60.0130.03012.37
4.3.50.0070.02712.37
4.3.40.0070.05012.37
4.3.30.0030.03712.37
4.3.20.0070.02012.37
4.3.10.0100.03312.37
4.3.00.0100.03012.37

preferences:
41.45 ms | 401 KiB | 5 Q