3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = '::1'; $parts = explode(':', $address); $len = count($parts); if ($len < 8) { if ($parts[0] === '') { array_splice($parts, 0, 2, array_fill(0, 8 - $len, 0)); $parts = array_reverse($parts); } else { $parts = array_reverse($parts); if ($parts[0] === '') { array_splice($parts, 0, 2, array_fill(0, 8 - $len, 0)); } else { } } } var_dump($parts);

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.40.0070.00718.66
8.3.30.0060.01220.17
8.3.20.0040.00420.40
8.3.10.0040.00421.22
8.3.00.0050.00322.46
8.2.170.0080.00822.96
8.2.160.0030.01020.38
8.2.150.0030.00624.18
8.2.140.0110.00024.66
8.2.130.0140.00026.16
8.2.120.0050.00320.94
8.2.110.0080.00322.30
8.2.100.0110.00017.78
8.2.90.0060.00319.07
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00817.92
8.2.50.0040.00418.07
8.2.40.0080.00018.28
8.2.30.0070.00419.44
8.2.20.0040.00417.76
8.2.10.0060.00317.68
8.2.00.0050.00517.85
8.1.270.0080.00023.99
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0070.00322.11
8.1.230.0080.00420.85
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0040.00417.23
8.1.190.0000.00817.40
8.1.180.0030.00518.10
8.1.170.0050.00518.71
8.1.160.0000.00718.81
8.1.150.0040.00418.64
8.1.140.0050.00317.45
8.1.130.0040.00417.74
8.1.120.0000.00717.44
8.1.110.0000.00717.37
8.1.100.0000.00817.52
8.1.90.0080.00017.41
8.1.80.0030.00517.36
8.1.70.0070.00017.36
8.1.60.0070.00017.59
8.1.50.0040.00417.57
8.1.40.0080.00017.35
8.1.30.0070.00017.65
8.1.20.0040.00417.55
8.1.10.0040.00417.54
8.1.00.0000.00917.39
8.0.300.0080.00018.77
8.0.290.0000.00716.63
8.0.280.0030.00318.46
8.0.270.0050.00217.13
8.0.260.0030.00316.76
8.0.250.0000.00716.89
8.0.240.0080.00016.93
8.0.230.0030.00316.77
8.0.220.0040.00416.79
8.0.210.0040.00416.83
8.0.200.0000.00716.91
8.0.190.0000.00716.86
8.0.180.0000.00716.86
8.0.170.0000.00716.83
8.0.160.0000.00816.76
8.0.150.0000.00716.79
8.0.140.0030.00316.88
8.0.130.0050.00013.28
8.0.120.0040.00416.75
8.0.110.0000.00717.00
8.0.100.0000.00716.87
8.0.90.0050.00216.93
8.0.80.0030.01216.86
8.0.70.0000.00816.71
8.0.60.0040.00416.83
8.0.50.0070.00016.74
8.0.30.0070.01217.13
8.0.20.0150.00817.40
8.0.10.0050.00317.07
8.0.00.0110.00916.87
7.4.330.0000.00516.67
7.4.320.0030.00316.45
7.4.300.0060.00016.55
7.4.290.0030.00316.51
7.4.280.0070.00016.59
7.4.270.0070.00016.54
7.4.260.0000.00513.39
7.4.250.0040.00416.57
7.4.240.0080.00016.64
7.4.230.0030.00316.32
7.4.220.0120.00916.62
7.4.210.0090.00516.55
7.4.200.0070.00016.61
7.4.190.0040.00416.67
7.4.160.0080.00816.39
7.4.150.0110.00817.40
7.4.140.0120.00817.86
7.4.130.0110.00816.43
7.4.120.0070.01116.46
7.4.110.0030.01416.45
7.4.100.0110.00716.53
7.4.90.0110.01416.63
7.4.80.0090.00919.39
7.4.70.0090.00916.53
7.4.60.0050.01616.30
7.4.50.0060.00316.32
7.4.40.0070.00722.77
7.4.30.0140.00316.48
7.4.10.0040.01415.09
7.4.00.0070.00914.87
7.3.330.0000.00613.20
7.3.320.0050.00013.16
7.3.310.0000.00716.31
7.3.300.0070.00016.36
7.3.290.0030.01016.21
7.3.280.0080.01116.28
7.3.270.0080.00817.40
7.3.260.0100.01018.24
7.3.250.0060.01316.50
7.3.240.0140.00316.21
7.3.230.0060.01016.39
7.3.210.0100.00716.47
7.3.200.0120.01019.39
7.3.190.0110.00816.29
7.3.180.0040.01216.61
7.3.170.0000.01616.27
7.3.160.0070.01016.40
7.3.130.0100.00715.05
7.3.120.0060.01114.90
7.3.110.0060.00914.79
7.3.100.0030.01314.80
7.3.90.0050.00714.81
7.3.80.0060.00514.63
7.3.70.0070.00714.78
7.3.60.0050.01014.62
7.3.50.0020.01014.75
7.3.40.0070.00714.88
7.3.30.0060.01014.76
7.3.20.0020.01216.74
7.3.10.0080.00616.61
7.3.00.0070.00716.61
7.2.330.0060.01216.48
7.2.320.0120.00816.52
7.2.310.0120.00616.85
7.2.300.0090.00916.45
7.2.290.0100.00716.49
7.2.260.0150.00414.88
7.2.250.0120.00715.15
7.2.240.0080.00814.97
7.2.230.0070.00815.14
7.2.220.0020.01315.09
7.2.210.0060.01015.11
7.2.200.0050.01014.91
7.2.190.0060.00914.89
7.2.180.0070.00614.89
7.2.170.0050.00915.03
7.2.160.0040.00814.86
7.2.150.0020.01316.83
7.2.140.0050.00816.74
7.2.130.0020.01116.83
7.2.120.0060.00716.83
7.2.110.0060.01116.65
7.2.100.0060.00816.92
7.2.90.0060.01016.80
7.2.80.0080.00716.86
7.2.70.0070.00716.68
7.2.60.0050.00916.77
7.2.50.0020.00816.83
7.2.40.0080.00816.89
7.2.30.0070.00816.92
7.2.20.0070.00916.94
7.2.10.0060.00816.72
7.2.00.0050.00917.37
7.1.330.0050.00815.88
7.1.320.0060.00915.77
7.1.310.0080.00415.89
7.1.300.0040.00915.70
7.1.290.0020.01115.75
7.1.280.0050.00615.62
7.1.270.0030.00815.77
7.1.260.0070.00515.79
7.1.250.0030.00915.83
7.1.240.0100.00315.56
7.1.230.0030.00815.86
7.1.220.0050.00715.63
7.1.210.0020.00915.67
7.1.200.0080.00415.80
7.1.190.0040.00715.71
7.1.180.0040.00915.72
7.1.170.0060.00715.76
7.1.160.0020.00815.73
7.1.150.0050.00815.60
7.1.140.0090.00515.78
7.1.130.0040.00815.83
7.1.120.0040.00515.73
7.1.110.0050.00915.78
7.1.100.0020.01116.70
7.1.90.0060.00715.75
7.1.80.0080.00315.79
7.1.70.0060.00615.93
7.1.60.0080.00716.84
7.1.50.0040.01116.19
7.1.40.0070.00315.58
7.1.30.0040.00915.73
7.1.20.0040.01115.75
7.1.10.0060.00715.73
7.1.00.0050.02517.83
7.0.330.0060.00615.31
7.0.320.0070.00815.30
7.0.310.0060.00715.43
7.0.300.0000.01115.31
7.0.290.0060.00515.35
7.0.280.0000.01515.46
7.0.270.0050.00615.18
7.0.260.0050.00715.53
7.0.250.0010.01115.33
7.0.240.0060.00715.38
7.0.230.0050.00715.42
7.0.220.0060.00715.43
7.0.210.0060.00615.53
7.0.200.0040.00715.93
7.0.190.0030.00915.54
7.0.180.0070.00615.42
7.0.170.0030.00615.42
7.0.160.0090.00515.53
7.0.150.0060.00715.23
7.0.140.0030.03117.56
7.0.130.0030.00815.48
7.0.120.0060.00915.45
7.0.110.0030.03217.63
7.0.100.0020.03517.55
7.0.90.0080.03017.60
7.0.80.0100.02817.52
7.0.70.0060.02817.52
7.0.60.0040.02917.49
7.0.50.0080.02717.44
7.0.40.0040.03215.50
7.0.30.0040.03015.58
7.0.20.0060.01815.44
7.0.10.0080.02815.45
7.0.00.0050.02915.61
5.6.400.0120.00014.21
5.6.390.0070.00313.93
5.6.380.0040.00914.33
5.6.370.0070.00614.21
5.6.360.0050.00614.49
5.6.350.0000.01314.29
5.6.340.0070.00514.36
5.6.330.0070.00714.49
5.6.320.0020.01014.47
5.6.310.0020.01214.38
5.6.300.0060.00314.47
5.6.290.0030.00914.55
5.6.280.0040.03116.80
5.6.270.0080.00514.57
5.6.260.0030.02116.55
5.6.250.0070.03116.27
5.6.240.0100.02116.49
5.6.230.0080.02716.36
5.6.220.0020.02216.35
5.6.210.0060.02916.42
5.6.200.0070.02916.42
5.6.190.0040.03116.34
5.6.180.0060.03116.32
5.6.170.0060.03116.42
5.6.160.0070.02916.45
5.6.150.0080.02416.49
5.6.140.0070.03216.51
5.6.130.0050.02516.42
5.6.120.0050.02916.34
5.6.110.0070.02616.47
5.6.100.0020.02416.41
5.6.90.0090.02716.47
5.6.80.0040.02516.12
5.6.70.0080.02716.19
5.6.60.0040.01916.19
5.6.50.0040.01916.08
5.6.40.0060.01716.28
5.6.30.0030.01716.11
5.6.20.0060.01716.16
5.6.10.0080.01116.13
5.6.00.0050.01916.20
5.5.380.0040.03114.35
5.5.370.0070.02814.27
5.5.360.0040.02114.30
5.5.350.0000.03114.28
5.5.340.0010.03314.37
5.5.330.0030.03214.48
5.5.320.0080.02914.47
5.5.310.0050.02414.28
5.5.300.0020.02714.30
5.5.290.0050.02214.39
5.5.280.0100.02714.34
5.5.270.0050.02914.51
5.5.260.0010.02314.33
5.5.250.0030.01914.20
5.5.240.0040.02714.23
5.5.230.0040.01914.18
5.5.220.0040.01914.30
5.5.210.0050.01614.31
5.5.200.0040.01614.15
5.5.190.0050.01614.11
5.5.180.0020.01514.17
5.5.170.0020.00912.39
5.5.160.0060.01513.99
5.5.150.0020.03014.06
5.5.140.0020.01914.01
5.5.130.0020.01713.99
5.5.120.0030.03114.38
5.5.110.0030.03114.20
5.5.100.0030.02314.19
5.5.90.0050.01414.06
5.5.80.0040.01714.04
5.5.70.0030.02214.03
5.5.60.0050.01614.05
5.5.50.0050.01513.96
5.5.40.0020.01814.20
5.5.30.0030.01814.12
5.5.20.0020.02314.06
5.5.10.0060.01714.12
5.5.00.0020.01714.03
5.4.450.0030.03313.90
5.4.440.0030.02113.74
5.4.430.0040.01813.63
5.4.420.0030.02913.70
5.4.410.0070.01813.76
5.4.400.0060.02513.54
5.4.390.0020.01713.50
5.4.380.0050.01113.47
5.4.370.0020.01613.60
5.4.360.0020.01813.42
5.4.350.0030.01613.54
5.4.340.0030.01513.50
5.4.330.0050.00510.97
5.4.320.0050.01313.51
5.4.310.0020.01713.58
5.4.300.0050.01713.52
5.4.290.0020.02613.62
5.4.280.0010.03013.54
5.4.270.0050.01513.65
5.4.260.0030.02313.55
5.4.250.0020.01513.53
5.4.240.0010.01813.59
5.4.230.0040.01813.48
5.4.220.0050.01813.55
5.4.210.0050.01513.57
5.4.200.0020.01713.52
5.4.190.0020.01613.58
5.4.180.0040.01913.56
5.4.170.0020.01513.59
5.4.160.0040.01413.77
5.4.150.0040.01613.62
5.4.140.0040.01712.69
5.4.130.0020.01512.75
5.4.120.0040.01512.74
5.4.110.0040.01812.71
5.4.100.0010.01512.49
5.4.90.0050.01612.72
5.4.80.0020.01712.68
5.4.70.0060.01312.74
5.4.60.0020.01612.74
5.4.50.0040.01412.78
5.4.40.0050.02412.71
5.4.30.0010.01612.75
5.4.20.0010.01612.65
5.4.10.0020.01612.73
5.4.00.0010.01612.54
5.3.290.0040.01911.82
5.3.280.0030.02211.73
5.3.270.0050.01411.67
5.3.260.0020.01611.87
5.3.250.0030.01711.76
5.3.240.0070.01911.80
5.3.230.0040.01511.85
5.3.220.0040.01611.65
5.3.210.0050.02411.71
5.3.200.0020.01611.66
5.3.190.0060.02411.79
5.3.180.0020.01711.85
5.3.170.0030.01611.86
5.3.160.0010.01811.89
5.3.150.0010.01611.88
5.3.140.0010.01611.79
5.3.130.0010.01711.76
5.3.120.0060.01411.69
5.3.110.0020.01611.68
5.3.100.0060.01411.55
5.3.90.0030.01611.58
5.3.80.0030.01511.48
5.3.70.0050.01511.56
5.3.60.0040.01511.57
5.3.50.0040.01411.55
5.3.40.0030.02711.53
5.3.30.0040.01711.57
5.3.20.0020.02811.49
5.3.10.0040.02811.33
5.3.00.0020.02811.36
5.2.170.0050.01711.54
5.2.160.0050.01511.54
5.2.150.0060.02811.54
5.2.140.0020.03511.54
5.2.130.0000.03411.54
5.2.120.0080.01711.54
5.2.110.0040.03011.54
5.2.100.0020.02411.54
5.2.90.0000.04011.54
5.2.80.0000.03411.54
5.2.70.0020.03511.54
5.2.60.0050.02011.54
5.2.50.0020.03311.54
5.2.40.0070.02711.54
5.2.30.0020.03211.54
5.2.20.0020.03111.54
5.2.10.0020.02811.54
5.2.00.0050.03011.54
5.1.60.0020.01911.54
5.1.50.0000.02911.54
5.1.40.0050.01211.54
5.1.30.0040.01511.54
5.1.20.0010.02811.54
5.1.10.0020.02711.54
5.1.00.0000.02911.54
5.0.50.0060.02011.54
5.0.40.0030.02211.54
5.0.30.0040.03411.54
5.0.20.0080.01311.54
5.0.10.0000.02211.54
5.0.00.0050.03011.54
4.4.90.0020.01611.54
4.4.80.0020.01711.54
4.4.70.0000.01611.54
4.4.60.0060.01411.54
4.4.50.0020.01211.54
4.4.40.0030.01311.54
4.4.30.0000.01211.54
4.4.20.0060.01211.54
4.4.10.0040.01111.54
4.4.00.0020.02511.54
4.3.110.0000.01911.54
4.3.100.0040.01811.54
4.3.90.0020.01811.54
4.3.80.0020.02211.54
4.3.70.0000.01811.54
4.3.60.0000.01911.54
4.3.50.0020.01211.54
4.3.40.0020.02211.54
4.3.30.0000.02211.54
4.3.20.0000.01811.54
4.3.10.0000.01611.54
4.3.00.0010.01811.54

preferences:
39.6 ms | 400 KiB | 5 Q