3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getRange($ip) { $split = explode('.',$ip); $final = array(); foreach ($split as $block) { $pos = strpos($block, '*'); if ($pos !== false) { $num = substr($block, 0, $pos); $l = strlen($block); $min = (int) min(255,str_pad($num,3,'0')); $max = (int) min(255,str_pad($num,3,'9')); $minip = $final; $minip[] = $min; $minip = array_pad($minip, 4, 0); $maxip = $final; $maxip[] = $max; $maxip = array_pad($maxip, 4, 255); return array(implode('.',$minip),implode('.',$maxip)); } $final[] = $block; } return array(implode('.',$final),implode('.',$final)); // No range found. } print_R(getRange("255.2*"));

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.0120.00318.53
8.3.50.0240.00816.39
8.3.40.0100.01018.58
8.3.30.0070.00718.85
8.3.20.0040.00418.74
8.3.10.0000.00918.60
8.3.00.0030.00619.26
8.2.180.0070.00716.75
8.2.170.0070.00722.96
8.2.160.0070.00718.88
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00720.66
8.2.110.0000.00922.13
8.2.100.0060.00619.58
8.2.90.0100.00017.63
8.2.80.0090.00018.48
8.2.70.0000.00817.75
8.2.60.0030.00517.63
8.2.50.0000.00819.35
8.2.40.0060.00317.75
8.2.30.0070.00317.69
8.2.20.0040.00717.80
8.2.10.0000.00717.82
8.2.00.0030.00617.74
8.1.280.0090.01325.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00020.58
8.1.230.0040.00717.72
8.1.220.0070.00017.79
8.1.210.0000.00818.77
8.1.200.0000.00817.23
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0000.00717.62
8.1.160.0000.00818.64
8.1.150.0000.00818.64
8.1.140.0070.00017.46
8.1.130.0000.00717.75
8.1.120.0040.00417.41
8.1.110.0040.00417.49
8.1.100.0040.00417.48
8.1.90.0040.00417.36
8.1.80.0000.00717.38
8.1.70.0000.00717.36
8.1.60.0000.00817.61
8.1.50.0000.00817.54
8.1.40.0000.00717.43
8.1.30.0040.00417.57
8.1.20.0000.01017.51
8.1.10.0050.00217.59
8.1.00.0040.00417.44
8.0.300.0000.00720.59
8.0.290.0040.00416.75
8.0.280.0040.00418.02
8.0.270.0000.00717.19
8.0.260.0000.00616.74
8.0.250.0000.00716.97
8.0.240.0000.00716.91
8.0.230.0040.00416.88
8.0.220.0000.00716.93
8.0.210.0070.00016.91
8.0.200.0030.00517.00
8.0.190.0040.00416.99
8.0.180.0030.00616.93
8.0.170.0030.00616.90
8.0.160.0000.00716.82
8.0.150.0000.00816.79
8.0.140.0000.01016.86
8.0.130.0000.00513.29
8.0.120.0070.00316.83
8.0.110.0050.00216.92
8.0.100.0040.00416.78
8.0.90.0040.00416.71
8.0.80.0090.00616.95
8.0.70.0000.00816.80
8.0.60.0040.00416.78
8.0.50.0000.00816.79
8.0.30.0130.00317.08
8.0.20.0110.00817.22
8.0.10.0050.00316.89
8.0.00.0100.00816.76
7.4.330.0050.00013.00
7.4.320.0070.00016.47
7.4.300.0030.00316.56
7.4.290.0000.00716.59
7.4.280.0000.00716.62
7.4.270.0000.00716.53
7.4.260.0000.00713.16
7.4.250.0040.00416.59
7.4.240.0030.00616.54
7.4.230.0070.00016.42
7.4.220.0100.01016.54
7.4.210.0000.01516.57
7.4.200.0030.00316.52
7.4.190.0080.00016.75
7.4.160.0060.00916.22
7.4.150.0110.00716.34
7.4.140.0030.01416.49
7.4.130.0120.00816.43
7.4.120.0030.01316.61
7.4.110.0060.01216.29
7.4.100.0060.01316.57
7.4.90.0030.01616.41
7.4.80.0030.01319.39
7.4.70.0090.00916.62
7.4.60.0000.01516.41
7.4.50.0030.00616.37
7.4.40.0060.00916.60
7.4.30.0100.01016.73
7.4.10.0110.00714.85
7.4.00.0040.01315.17
7.3.330.0000.00713.36
7.3.320.0000.00813.21
7.3.310.0000.00716.23
7.3.300.0060.00016.38
7.3.290.0090.00916.37
7.3.280.0110.00716.44
7.3.270.0130.00316.64
7.3.260.0120.01216.67
7.3.250.0110.00716.45
7.3.240.0100.00716.35
7.3.230.0080.00816.50
7.3.210.0070.01016.57
7.3.200.0030.01416.66
7.3.190.0110.00616.34
7.3.180.0000.01516.64
7.3.170.0160.00316.66
7.3.160.0090.01316.49
7.3.130.0040.00714.64
7.3.120.0070.01014.82
7.3.110.0070.01014.85
7.3.100.0070.00714.88
7.3.90.0060.00914.91
7.3.80.0050.00614.75
7.3.70.0050.00514.78
7.3.60.0050.01014.88
7.3.50.0080.00914.97
7.3.40.0060.00614.82
7.3.30.0080.00614.88
7.3.20.0030.00816.80
7.3.10.0090.00516.63
7.3.00.0060.00616.64
7.2.330.0070.01016.59
7.2.320.0070.01016.78
7.2.310.0120.01216.76
7.2.300.0030.01316.70
7.2.290.0100.00616.82
7.2.260.0100.01015.20
7.2.250.0090.00915.13
7.2.240.0090.00915.18
7.2.230.0080.00814.92
7.2.220.0050.01115.16
7.2.210.0060.00614.97
7.2.200.0050.00914.96
7.2.190.0090.00515.10
7.2.180.0080.00815.03
7.2.170.0050.01114.85
7.2.160.0060.00915.13
7.2.150.0090.00617.04
7.2.140.0030.01417.01
7.2.130.0120.00017.00
7.2.120.0070.01417.02
7.2.110.0120.00317.04
7.2.100.0040.00716.89
7.2.90.0030.01516.85
7.2.80.0080.00816.87
7.2.70.0060.00316.81
7.2.60.0060.00316.79
7.2.50.0090.00616.73
7.2.40.0070.01117.11
7.2.30.0040.00817.16
7.2.20.0060.00617.20
7.2.10.0030.01017.04
7.2.00.0050.00518.36
7.1.330.0040.01215.73
7.1.320.0050.00915.72
7.1.310.0070.00715.89
7.1.300.0020.01016.01
7.1.290.0080.00815.65
7.1.280.0080.00415.67
7.1.270.0060.00415.82
7.1.260.0040.00715.89
7.1.250.0000.00915.79
7.1.240.0060.00315.61
7.1.230.0030.00815.68
7.1.220.0070.00315.78
7.1.210.0070.00315.85
7.1.200.0090.00615.62
7.1.190.0000.01015.77
7.1.180.0050.00515.49
7.1.170.0030.01015.54
7.1.160.0070.00315.95
7.1.150.0040.01116.01
7.1.140.0030.01215.55
7.1.130.0040.01115.93
7.1.120.0030.00915.66
7.1.110.0070.00715.95
7.1.100.0060.00517.09
7.1.90.0060.00615.70
7.1.80.0060.00615.89
7.1.70.0060.00616.54
7.1.60.0090.01017.48
7.1.50.0060.00616.41
7.1.40.0070.00715.86
7.1.30.0100.00315.82
7.1.20.0040.00715.71
7.1.10.0040.00415.63
7.1.00.0050.03218.98
7.0.330.0040.00815.29
7.0.320.0040.01115.41
7.0.310.0070.00715.50
7.0.300.0070.01115.48
7.0.290.0000.01115.57
7.0.280.0000.01215.52
7.0.270.0100.00015.26
7.0.260.0060.00315.27
7.0.250.0000.01315.50
7.0.240.0030.00715.59
7.0.230.0030.01015.53
7.0.220.0000.01615.53
7.0.210.0090.00615.62
7.0.200.0060.00216.13
7.0.190.0090.00315.48
7.0.180.0000.01415.61
7.0.170.0030.01015.45
7.0.160.0000.01415.60
7.0.150.0060.00315.30
7.0.140.0090.03518.63
7.0.130.0000.01515.23
7.0.120.0030.04318.66
7.0.110.0000.00815.46
7.0.100.0110.00015.44
7.0.90.0110.00415.39
7.0.80.0100.00315.52
7.0.70.0060.00615.38
7.0.60.0030.02818.02
7.0.50.0090.04017.05
7.0.40.0100.04017.09
7.0.30.0150.04216.98
7.0.20.0150.03717.12
7.0.10.0070.03217.16
7.0.00.0080.04517.05
5.6.400.0000.01614.86
5.6.390.0060.01014.59
5.6.380.0140.00014.68
5.6.370.0030.01214.66
5.6.360.0030.01414.75
5.6.350.0030.01014.59
5.6.340.0080.00414.84
5.6.330.0040.00714.80
5.6.320.0060.00914.38
5.6.310.0090.00914.04
5.6.300.0050.00814.45
5.6.290.0040.00814.44
5.6.280.0030.04217.82
5.6.270.0040.00414.45
5.6.260.0060.00314.77
5.6.250.0110.00414.30
5.6.240.0030.00914.45
5.6.230.0070.00714.53
5.6.220.0030.01314.16
5.6.210.0030.04717.56
5.6.200.0050.03416.30
5.6.190.0100.02717.51
5.6.180.0250.04117.46
5.6.170.0200.03117.55
5.6.160.0080.03017.68
5.6.150.0070.04316.32
5.6.140.0060.04516.42
5.6.130.0030.02816.21
5.6.120.0100.02817.73
5.6.110.0080.04217.72
5.6.100.0040.02717.80
5.6.90.0030.02517.68
5.6.80.0050.04817.46
5.6.70.0000.01214.46
5.6.60.0060.00314.13
5.6.50.0060.00614.66
5.6.40.0040.00914.15
5.6.30.0000.01414.52
5.6.20.0000.01314.56
5.6.10.0060.00614.14
5.6.00.0070.00314.67
5.5.380.0040.01114.32
5.5.370.0100.00314.33
5.5.360.0040.00814.54
5.5.350.0170.01817.32
5.5.340.0050.03716.30
5.5.330.0100.04317.38
5.5.320.0220.03017.56
5.5.310.0180.02817.51
5.5.300.0050.02416.34
5.5.290.0050.03816.13
5.5.280.0080.03217.64
5.5.270.0070.04917.56
5.5.260.0060.02517.45
5.5.250.0100.04217.41
5.5.240.0100.02917.25
5.5.230.0070.00414.49
5.5.220.0000.00914.41
5.5.210.0000.01714.39
5.5.200.0030.01014.18
5.5.190.0070.00714.52
5.5.180.0030.00614.10
5.5.170.0070.01014.39
5.5.160.0040.01114.42
5.5.150.0000.01013.96
5.5.140.0030.01014.66
5.5.130.0040.00414.49
5.5.120.0100.00314.16
5.5.110.0030.00713.99
5.5.100.0000.01114.22
5.5.90.0060.00614.19
5.5.80.0040.01114.27
5.5.70.0030.01014.46
5.5.60.0030.00714.31
5.5.50.0060.00614.38
5.5.40.0000.01314.32
5.5.30.0000.01614.16
5.5.20.0030.01014.32
5.5.10.0000.01414.21
5.5.00.0070.00714.07
5.4.450.0080.04015.87
5.4.440.0140.02815.87
5.4.430.0050.04515.88
5.4.420.0070.02515.85
5.4.410.0090.02615.79
5.4.400.0060.02115.75
5.4.390.0070.02415.74
5.4.380.0020.03715.70
5.4.370.0070.02115.63
5.4.360.0110.03315.70
5.4.350.0070.04315.70
5.4.340.0040.02815.74
5.4.330.0070.00312.25
5.4.320.0080.02515.68
5.4.310.0080.03115.62
5.4.300.0060.03815.58
5.4.290.0060.03515.55
5.4.280.0020.02315.69
5.4.270.0080.04015.74
5.4.260.0080.02715.61
5.4.250.0050.02015.54
5.4.240.0050.02215.70
5.4.230.0050.02115.70
5.4.220.0070.04215.56
5.4.210.0020.03015.70
5.4.200.0040.02515.69
5.4.190.0000.04315.66
5.4.180.0020.02315.68
5.4.170.0050.04215.74
5.4.160.0110.03115.72
5.4.150.0080.03915.67
5.4.140.0020.03214.29
5.4.130.0030.04014.37
5.4.120.0080.03214.37
5.4.110.0030.02814.37
5.4.100.0070.04014.33
5.4.90.0100.02814.46
5.4.80.0050.04414.31
5.4.70.0030.04114.32
5.4.60.0060.01814.28
5.4.50.0070.02514.32
5.4.40.0070.02214.33
5.4.30.0030.03114.38
5.4.20.0050.02214.37
5.4.10.0030.02614.36
5.4.00.0060.02014.10
5.3.290.0050.02713.46
5.3.280.0030.01913.44
5.3.270.0050.04313.44
5.3.260.0080.02613.44
5.3.250.0100.03313.39
5.3.240.0050.02713.45
5.3.230.0040.02613.43
5.3.220.0050.02613.36
5.3.210.0110.01713.44
5.3.200.0060.02113.41
5.3.190.0070.04413.42
5.3.180.0050.02813.49
5.3.170.0050.04013.45
5.3.160.0020.04413.37
5.3.150.0090.03913.48
5.3.140.0030.04213.41
5.3.130.0050.02813.48
5.3.120.0060.02513.40
5.3.110.0030.02813.42
5.3.100.0030.02613.16
5.3.90.0000.02613.15
5.3.80.0020.02213.08
5.3.70.0100.03213.21
5.3.60.0030.03413.14
5.3.50.0040.02813.10
5.3.40.0030.02313.12
5.3.30.0030.02513.03
5.3.20.0060.03113.01
5.3.10.0110.02312.96
5.3.00.0020.02712.89
5.2.170.0000.03311.08
5.2.160.0070.02711.22
5.2.150.0070.06011.31
5.2.140.0000.04011.16
5.2.130.0030.03011.07
5.2.120.0030.05011.27
5.2.110.0030.04011.15
5.2.100.0030.06311.01
5.2.90.0030.04311.10
5.2.80.0030.03711.04
5.2.70.0030.06711.03
5.2.60.0070.02711.07
5.2.50.0000.05010.99
5.2.40.0030.03311.02
5.2.30.0030.04711.15
5.2.20.0070.03010.93
5.2.10.0030.05710.93
5.2.00.0030.03710.74
5.1.60.0070.05310.05
5.1.50.0070.02710.03
5.1.40.0000.03310.04
5.1.30.0070.02710.35
5.1.20.0000.04710.44
5.1.10.0030.02710.15
5.1.00.0000.0309.99
5.0.50.0000.0508.47
5.0.40.0000.0238.48
5.0.30.0100.0478.21
5.0.20.0070.0378.27
5.0.10.0000.0478.21
5.0.00.0000.0738.32
4.4.90.0000.0177.96
4.4.80.0000.0307.96
4.4.70.0000.0337.96
4.4.60.0030.0337.96
4.4.50.0070.0307.96
4.4.40.0030.0537.96
4.4.30.0000.0207.96
4.4.20.0000.0177.96
4.4.10.0000.0177.96
4.4.00.0000.0277.96
4.3.110.0000.0207.96
4.3.100.0070.0337.96
4.3.90.0100.0307.96
4.3.80.0000.0507.96
4.3.70.0070.0237.96
4.3.60.0070.0177.96
4.3.50.0000.0307.96
4.3.40.0000.0577.96
4.3.30.0070.0277.96
4.3.20.0070.0107.96
4.3.10.0030.0377.96
4.3.00.0000.0177.96

preferences:
49.36 ms | 401 KiB | 5 Q