3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = '1::1'; $parts = explode(':', $address); $len = count($parts); if ($len < 8) { if ($parts[0] === '') { array_splice($parts, 0, 0, array_fill(0, 8 - $len, 0)); $parts = array_reverse($parts); } else { $parts = array_reverse($parts); if ($parts[0] === '') { array_splice($parts, 0, 0, array_fill(0, 8 - $len, 0)); } else { array_splice($parts, array_search('', $parts), 0, array_fill(0, 8 - $len, 0)); } } } $nibbles = []; $hex = '0123456789abcdef'; foreach (array_map('hexdec', $parts) as $part) { array_push( $nibbles, $hex[($part & 0xF000) >> 12], $hex[($part & 0x0F00) >> 8], $hex[($part & 0x00F0) >> 4], $hex[$part & 0x000F] ); } echo implode('.', $nibbles);

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.0040.01416.75
8.3.50.0090.01417.50
8.3.40.0110.00418.75
8.3.30.0090.00618.71
8.3.20.0000.00818.81
8.3.10.0000.00918.85
8.3.00.0040.00419.25
8.2.180.0070.01116.50
8.2.170.0130.01022.96
8.2.160.0140.00421.02
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0030.00620.96
8.2.110.0030.00721.13
8.2.100.0080.00317.72
8.2.90.0060.00319.53
8.2.80.0040.00419.31
8.2.70.0000.00817.50
8.2.60.0080.00017.80
8.2.50.0080.00418.07
8.2.40.0060.00318.01
8.2.30.0040.00718.00
8.2.20.0000.00817.75
8.2.10.0050.00217.68
8.2.00.0030.00617.83
8.1.280.0110.00325.92
8.1.270.0000.00724.66
8.1.260.0040.01126.35
8.1.250.0050.00228.09
8.1.240.0030.00622.60
8.1.230.0070.00420.88
8.1.220.0050.00317.79
8.1.210.0120.00019.04
8.1.200.0080.00317.35
8.1.190.0080.00017.52
8.1.180.0040.00418.10
8.1.170.0050.00318.82
8.1.160.0040.00418.97
8.1.150.0040.00418.58
8.1.140.0040.00417.32
8.1.130.0000.00717.77
8.1.120.0090.00017.38
8.1.110.0000.00817.50
8.1.100.0050.00217.35
8.1.90.0040.00417.41
8.1.80.0050.00317.42
8.1.70.0000.01017.43
8.1.60.0000.00917.52
8.1.50.0000.00817.38
8.1.40.0040.00417.53
8.1.30.0040.00417.71
8.1.20.0020.00517.66
8.1.10.0060.00317.61
8.1.00.0040.00417.54
8.0.300.0000.00719.97
8.0.290.0060.00316.63
8.0.280.0030.00318.38
8.0.270.0050.00317.35
8.0.260.0030.00316.79
8.0.250.0070.00016.98
8.0.240.0030.00316.89
8.0.230.0030.00316.92
8.0.220.0070.00016.86
8.0.210.0000.00716.93
8.0.200.0030.00316.84
8.0.190.0040.00417.02
8.0.180.0000.00716.85
8.0.170.0020.00516.93
8.0.160.0000.00816.92
8.0.150.0050.00316.82
8.0.140.0000.00816.94
8.0.130.0030.00313.35
8.0.120.0000.00716.83
8.0.110.0070.00016.75
8.0.100.0050.00317.02
8.0.90.0040.00416.93
8.0.80.0080.00616.88
8.0.70.0030.00516.83
8.0.60.0000.00716.75
8.0.50.0000.00716.74
8.0.30.0100.01017.31
8.0.20.0130.00716.89
8.0.10.0050.00317.10
8.0.00.0070.01216.86
7.4.330.0020.00213.00
7.4.320.0000.00616.61
7.4.300.0000.00616.64
7.4.290.0030.00316.57
7.4.280.0080.00016.66
7.4.270.0030.00316.67
7.4.260.0000.00513.35
7.4.250.0090.00016.58
7.4.240.0050.00316.57
7.4.230.0000.00716.45
7.4.220.0180.00016.64
7.4.210.0080.00816.54
7.4.200.0070.00016.33
7.4.190.0030.00316.79
7.4.160.0100.00716.48
7.4.150.0070.01116.41
7.4.140.0070.01016.57
7.4.130.0090.00916.36
7.4.120.0090.00816.43
7.4.110.0090.01316.57
7.4.100.0100.00616.42
7.4.90.0160.00616.36
7.4.80.0000.02219.39
7.4.70.0120.01216.53
7.4.60.0030.01316.51
7.4.50.0040.00716.60
7.4.40.0100.00716.23
7.4.30.0040.01216.41
7.4.00.0060.00814.74
7.3.330.0000.00713.07
7.3.320.0030.00313.27
7.3.310.0070.00016.48
7.3.300.0030.00316.37
7.3.290.0130.00616.34
7.3.280.0090.00916.28
7.3.270.0030.01316.31
7.3.260.0080.00816.60
7.3.250.0140.00816.44
7.3.240.0070.01016.68
7.3.230.0000.01716.44
7.3.210.0120.00916.27
7.3.200.0120.00616.43
7.3.190.0070.01416.53
7.3.180.0100.01216.30
7.3.170.0150.00616.26
7.3.160.0120.00916.40
7.3.120.0050.01014.73
7.3.110.0050.01014.83
7.3.100.0080.00514.82
7.3.90.0100.00314.85
7.3.80.0020.01314.80
7.3.70.0050.00614.85
7.3.60.0090.00514.73
7.3.50.0050.00714.73
7.3.40.0040.00714.77
7.3.30.0020.01014.90
7.3.20.0070.00716.54
7.3.10.0070.00716.63
7.3.00.0030.01016.54
7.2.330.0120.00616.57
7.2.320.0030.01516.87
7.2.310.0070.01016.65
7.2.300.0060.01216.68
7.2.290.0080.00816.79
7.2.250.0040.01414.88
7.2.240.0050.01015.06
7.2.230.0060.00515.10
7.2.220.0010.01114.80
7.2.210.0040.00815.08
7.2.200.0060.00914.94
7.2.190.0080.00315.12
7.2.180.0070.00915.12
7.2.170.0050.00514.95
7.2.160.0040.01115.02
7.2.150.0060.00616.98
7.2.140.0030.00617.05
7.2.130.0060.00916.97
7.2.120.0070.00616.95
7.2.110.0060.00616.88
7.2.100.0050.00816.94
7.2.90.0030.01016.89
7.2.80.0060.00816.80
7.2.70.0030.01016.79
7.2.60.0050.01016.60
7.2.50.0080.00716.89
7.2.40.0060.00716.97
7.2.30.0040.00817.04
7.2.20.0070.00616.77
7.2.10.0050.01116.82
7.2.00.0050.00517.01
7.1.330.0070.00615.52
7.1.320.0060.00615.69
7.1.310.0060.00415.65
7.1.300.0080.00515.96
7.1.290.0050.01015.80
7.1.280.0050.00615.77
7.1.270.0070.00715.75
7.1.260.0030.01115.83
7.1.250.0060.00815.75
7.1.70.0000.00817.07
7.1.60.0130.01319.40
7.1.50.0080.00816.98
7.1.00.0130.05322.46
7.0.200.0000.00716.47
7.0.140.0070.06722.00
7.0.120.0070.06322.04
7.0.60.0270.07720.04
7.0.50.0030.05017.79
7.0.40.0030.04317.79
7.0.30.0070.04017.70
7.0.20.0000.04317.64
7.0.10.0000.04317.66
7.0.00.0000.04317.79
5.6.280.0000.07720.89
5.6.210.0030.06320.47
5.6.200.0070.08318.14
5.6.190.0070.07718.12
5.6.180.0000.04318.18
5.6.170.0100.03318.18
5.6.160.0000.04318.12
5.6.150.0030.04018.18
5.6.140.0000.04018.11
5.6.130.0070.03718.22
5.6.120.0030.04018.10
5.6.110.0070.03718.17
5.6.100.0070.04018.20
5.6.90.0070.03718.11
5.6.80.0000.04017.46
5.6.70.0000.04017.59
5.6.60.0000.04017.46
5.6.50.0030.03717.54
5.6.40.0070.03317.57
5.6.30.0070.03317.57
5.6.20.0000.04017.50
5.6.10.0100.03317.47
5.6.00.0000.05017.42
5.5.350.0170.07720.47
5.5.340.0170.07017.99
5.5.330.0070.05717.95
5.5.320.0030.04317.98
5.5.310.0070.03718.02
5.5.300.0030.04017.92
5.5.290.0070.03717.87
5.5.280.0030.04017.95
5.5.270.0070.03717.91
5.5.260.0030.04018.01
5.5.250.0000.04017.81
5.5.240.0030.03717.33
5.5.230.0170.02717.36
5.5.220.0000.04017.39
5.5.210.0030.03717.35
5.5.200.0000.04717.31
5.5.190.0070.03717.35
5.5.180.0030.03717.36
5.5.160.0070.05317.28
5.5.150.0070.07317.32
5.5.140.0100.07017.33
5.5.130.0100.07317.32
5.5.120.0030.04017.29
5.5.110.0030.04017.27
5.5.100.0100.07317.28
5.5.90.0170.06717.16
5.5.80.0070.07717.27
5.5.70.0100.03717.14
5.5.60.0070.04317.22
5.5.50.0030.08317.27
5.5.40.0100.07317.25
5.5.30.0100.07017.16
5.5.20.0030.05717.19
5.5.10.0100.06017.22
5.5.00.0100.06717.22
5.4.450.0100.03019.15
5.4.440.0030.03719.45
5.4.430.0030.03719.52
5.4.420.0000.04019.32
5.4.410.0000.04719.22
5.4.400.0000.04019.04
5.4.390.0030.03719.00
5.4.380.0030.03718.99
5.4.370.0030.04019.02
5.4.360.0070.03319.01
5.4.350.0000.04018.95
5.4.340.0030.03719.01
5.4.320.0100.03318.99
5.4.310.0000.06019.02
5.4.300.0100.04719.00
5.4.290.0100.07718.98
5.4.280.0070.05018.94
5.4.270.0070.04319.09
5.4.260.0000.07319.11
5.4.250.0200.06718.98
5.4.240.0030.05719.12
5.4.230.0030.07319.13
5.4.220.0070.08019.02
5.4.210.0030.06019.13
5.4.200.0030.04019.02
5.4.190.0070.07019.10
5.4.180.0030.06719.01
5.4.170.0130.06718.96
5.4.160.0000.05718.86
5.4.150.0100.06719.18
5.4.140.0070.04316.27
5.4.130.0030.05316.32
5.4.120.0000.04016.33
5.4.110.0070.04016.25
5.4.100.0070.03316.23
5.4.90.0000.04016.25
5.4.80.0100.05316.34
5.4.70.0070.05716.30
5.4.60.0030.05016.36
5.4.50.0000.08016.36
5.4.40.0100.04716.37
5.4.30.0070.06716.39
5.4.20.0070.06016.38
5.4.10.0170.06716.25
5.4.00.0200.06015.80
5.3.290.0070.06014.75
5.3.280.0030.08314.57
5.3.270.0030.04314.53
5.3.260.0000.06014.36
5.3.250.0000.05014.45
5.3.240.0070.06714.59
5.3.230.0000.04314.52
5.3.220.0100.04314.55
5.3.210.0070.06314.49
5.3.200.0130.03314.56
5.3.190.0100.05714.35
5.3.180.0100.05014.35
5.3.170.0100.07014.35
5.3.160.0100.07314.45
5.3.150.0100.07014.39
5.3.140.0130.05714.52
5.3.130.0070.07714.52
5.3.120.0130.06314.48
5.3.110.0130.07014.64
5.3.100.0000.04714.00
5.3.90.0030.04013.98
5.3.80.0030.04313.99
5.3.70.0030.03714.09
5.3.60.0100.03713.98
5.3.50.0070.07713.86
5.3.40.0100.07013.86
5.3.30.0000.05013.84
5.3.20.0070.06713.67
5.3.10.0100.04313.59
5.3.00.0000.04313.39
5.2.170.0030.06011.15
5.2.160.0070.05311.13
5.2.150.0030.05011.13
5.2.140.0070.05711.07
5.2.130.0000.04711.03
5.2.120.0030.06011.04
5.2.110.0030.05311.13
5.2.100.0030.06011.09
5.2.90.0030.06010.89
5.2.80.0000.04311.07
5.2.70.0030.07010.88
5.2.60.0030.04311.02
5.2.50.0130.02311.00
5.2.40.0000.06310.99
5.2.30.0000.03310.75
5.2.20.0030.02710.85
5.2.10.0030.05010.84
5.2.00.0070.05310.77
5.1.60.0000.06010.01
5.1.50.0030.04710.01
5.1.40.0030.05010.01
5.1.30.0070.05710.28
5.1.20.0100.03010.50
5.1.10.0070.05010.02
5.1.00.0070.05710.10
5.0.50.0070.04310.01
5.0.40.0000.02710.01
5.0.30.0070.04710.01
5.0.20.0030.04010.01
5.0.10.0000.02310.01
5.0.00.0030.03310.01
4.4.90.0070.03310.01
4.4.80.0030.01710.01
4.4.70.0000.02310.01
4.4.60.0030.03310.01
4.4.50.0000.03010.01
4.4.40.0000.05710.01
4.4.30.0000.04010.01
4.4.20.0070.03310.01
4.4.10.0000.03710.01
4.4.00.0030.02710.01
4.3.110.0030.03310.01
4.3.100.0000.02010.01
4.3.90.0030.01310.01
4.3.80.0030.05310.01
4.3.70.0000.02710.01
4.3.60.0000.01710.01
4.3.50.0070.02710.01
4.3.40.0000.04710.01
4.3.30.0100.02310.01
4.3.20.0070.03010.01
4.3.10.0000.03310.01
4.3.00.0030.03310.01

preferences:
50.2 ms | 401 KiB | 5 Q