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*.0.1"));

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.0170.00318.30
8.3.50.0090.00721.92
8.3.40.0110.01118.82
8.3.30.0140.00318.42
8.3.20.0000.00818.77
8.3.10.0070.00719.34
8.3.00.0120.00323.65
8.2.180.0090.00616.63
8.2.170.0110.00422.96
8.2.160.0150.00020.35
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0030.00519.79
8.2.110.0060.00322.27
8.2.100.0110.00017.85
8.2.90.0080.00018.22
8.2.80.0050.00318.05
8.2.70.0000.00817.63
8.2.60.0040.00418.03
8.2.50.0000.00918.07
8.2.40.0080.00318.22
8.2.30.0040.00421.27
8.2.20.0050.00317.79
8.2.10.0000.00717.68
8.2.00.0050.00317.78
8.1.280.0070.01125.92
8.1.270.0030.00523.99
8.1.260.0040.00426.35
8.1.250.0000.01128.09
8.1.240.0030.00722.09
8.1.230.0070.00321.03
8.1.220.0040.00417.74
8.1.210.0000.00918.99
8.1.200.0080.00017.35
8.1.190.0000.00817.43
8.1.180.0000.00818.10
8.1.170.0050.00318.59
8.1.160.0000.00718.89
8.1.150.0000.00718.57
8.1.140.0080.00017.55
8.1.130.0040.00417.82
8.1.120.0040.00417.41
8.1.110.0050.00317.41
8.1.100.0000.00717.38
8.1.90.0000.00717.51
8.1.80.0040.00417.37
8.1.70.0030.00317.32
8.1.60.0090.00017.58
8.1.50.0000.00817.45
8.1.40.0040.00417.52
8.1.30.0050.00317.71
8.1.20.0040.00417.53
8.1.10.0020.00517.48
8.1.00.0040.00417.34
8.0.300.0000.00820.09
8.0.290.0070.00017.04
8.0.280.0000.00718.52
8.0.270.0030.00317.27
8.0.260.0000.00716.83
8.0.250.0040.00416.98
8.0.240.0050.00316.85
8.0.230.0030.00316.93
8.0.220.0000.00816.79
8.0.210.0070.00016.79
8.0.200.0030.00316.86
8.0.190.0040.00416.97
8.0.180.0000.00716.93
8.0.170.0050.00516.91
8.0.160.0050.00316.90
8.0.150.0000.00716.82
8.0.140.0040.00416.91
8.0.130.0060.00013.29
8.0.120.0040.00416.87
8.0.110.0040.00416.77
8.0.100.0040.00416.87
8.0.90.0000.00716.80
8.0.80.0150.00616.81
8.0.70.0080.00016.79
8.0.60.0000.00716.96
8.0.50.0070.00016.93
8.0.30.0120.00817.06
8.0.20.0100.00717.40
8.0.10.0000.00717.14
8.0.00.0100.00816.67
7.4.330.0030.00214.77
7.4.320.0000.00616.66
7.4.300.0000.00616.54
7.4.290.0040.00416.49
7.4.280.0070.00016.51
7.4.270.0000.00716.62
7.4.260.0030.00313.31
7.4.250.0050.00316.54
7.4.240.0000.00716.44
7.4.230.0030.00316.68
7.4.220.0040.01516.46
7.4.210.0100.00616.56
7.4.200.0030.00316.32
7.4.190.0030.00516.48
7.4.160.0060.01216.51
7.4.150.0070.01017.40
7.4.140.0130.00717.86
7.4.130.0040.01216.50
7.4.120.0110.00816.54
7.4.110.0160.00716.40
7.4.100.0070.01016.62
7.4.90.0060.01216.58
7.4.80.0030.01419.39
7.4.70.0110.00616.40
7.4.60.0120.00416.57
7.4.50.0060.00316.23
7.4.40.0000.01322.52
7.4.30.0060.01016.57
7.4.00.0000.01515.20
7.3.330.0030.00313.39
7.3.320.0060.00013.15
7.3.310.0080.00016.39
7.3.300.0000.00716.21
7.3.290.0090.00616.31
7.3.280.0060.01016.39
7.3.270.0100.00717.40
7.3.260.0100.01018.24
7.3.250.0110.00516.59
7.3.240.0110.00616.68
7.3.230.0100.00716.45
7.3.210.0070.01016.57
7.3.200.0120.00919.39
7.3.190.0090.00916.39
7.3.180.0130.00316.36
7.3.170.0060.00916.34
7.3.160.0130.00316.63
7.3.120.0070.01014.99
7.3.00.0070.00716.77
7.2.330.0120.00616.44
7.2.320.0100.00716.76
7.2.310.0140.01016.82
7.2.300.0080.00916.53
7.2.290.0110.00716.55
7.2.130.0110.00416.67
7.2.120.0070.00716.45
7.2.110.0090.00616.77
7.2.100.0100.00716.91
7.2.90.0060.00616.69
7.2.80.0090.00916.59
7.2.70.0030.01016.70
7.2.60.0070.01016.95
7.2.50.0040.00817.04
7.2.40.0040.01216.87
7.2.30.0100.00616.91
7.2.20.0110.00716.79
7.2.10.0110.00416.78
7.2.00.0030.00818.11
7.1.250.0090.00415.55
7.1.240.0070.00715.75
7.1.230.0090.00615.73
7.1.220.0070.00415.43
7.1.210.0120.00015.45
7.1.200.0100.00615.81
7.1.190.0040.00715.76
7.1.180.0060.00615.81
7.1.170.0060.00315.90
7.1.160.0120.00415.56
7.1.150.0130.00315.64
7.1.140.0070.00715.77
7.1.130.0070.00715.44
7.1.120.0090.00315.73
7.1.110.0100.00615.61
7.1.100.0030.01017.05
7.1.90.0150.00315.95
7.1.80.0070.00715.53
7.1.70.0070.00616.40
7.1.60.0090.01017.52
7.1.50.0060.00716.31
7.1.40.0100.00315.59
7.1.30.0100.00715.57
7.1.20.0070.01115.35
7.1.10.0100.00315.64
7.1.00.0030.02319.20
7.0.330.0060.00615.39
7.0.320.0080.00815.27
7.0.310.0060.00915.18
7.0.300.0060.00615.27
7.0.290.0080.00315.27
7.0.280.0070.00715.28
7.0.270.0030.01015.14
7.0.260.0030.00915.34
7.0.250.0120.00615.57
7.0.240.0150.00315.18
7.0.230.0070.00715.40
7.0.220.0030.00615.35
7.0.210.0090.00615.29
7.0.200.0090.00515.98
7.0.190.0070.00715.29
7.0.180.0120.00315.32
7.0.170.0120.00315.18
7.0.160.0070.00715.11
7.0.150.0110.00415.32
7.0.140.0050.03818.61
7.0.130.0120.00315.04
7.0.120.0070.00715.34
7.0.110.0030.00715.02
7.0.100.0140.00015.13
7.0.90.0040.00715.11
7.0.80.0040.01215.05
7.0.70.0050.04618.48
7.0.60.0100.04418.85
7.0.50.0080.03319.07
7.0.40.0030.03916.94
7.0.30.0070.03217.11
7.0.20.0060.04417.12
7.0.10.0020.03117.02
7.0.00.0030.04517.06
5.6.380.0070.00314.15
5.6.370.0060.00814.33
5.6.360.0030.01014.67
5.6.350.0030.01013.98
5.6.340.0060.00613.89
5.6.330.0030.00914.11
5.6.320.0070.00714.28
5.6.310.0030.00614.42
5.6.300.0030.00714.16
5.6.290.0040.00814.04
5.6.280.0100.03417.80
5.6.270.0050.00714.29
5.6.260.0050.01014.25
5.6.250.0050.00314.05
5.6.240.0100.00714.22
5.6.230.0070.00714.21
5.6.220.0020.03917.35
5.6.210.0030.03217.49
5.6.200.0080.03317.67
5.6.190.0040.03317.61
5.6.180.0030.04917.68
5.6.170.0070.04817.65
5.6.160.0050.04717.61
5.6.150.0050.02717.63
5.6.140.0010.04417.77
5.6.130.0040.04617.75
5.6.120.0070.04317.76
5.6.110.0070.04517.76
5.6.100.0070.02917.69
5.6.90.0070.04717.66
5.6.80.0030.04317.19
5.6.70.0020.02717.32
5.6.60.0000.04517.29
5.6.50.0070.04317.28
5.6.40.0070.04017.34
5.6.30.0020.03717.19
5.6.20.0050.04517.22
5.6.10.0000.04317.29
5.6.00.0030.04517.28
5.5.380.0000.00711.40
5.5.370.0000.00511.18
5.5.360.0030.04515.76
5.5.350.0020.03215.83
5.5.340.0040.02916.13
5.5.330.0050.03816.01
5.5.320.0070.03816.03
5.5.310.0060.03916.02
5.5.300.0070.04416.13
5.5.290.0070.02816.07
5.5.280.0050.04016.13
5.5.270.0040.03816.10
5.5.260.0030.04415.97
5.5.250.0080.04015.95
5.5.240.0020.02715.74
5.5.230.0040.02215.76
5.5.220.0000.02515.71
5.5.210.0060.04215.74
5.5.200.0030.04815.70
5.5.190.0030.03815.72
5.5.180.0010.03115.59
5.5.170.0000.01111.18
5.5.160.0050.03015.73
5.5.150.0040.04415.70
5.5.140.0000.04715.70
5.5.130.0050.04015.58
5.5.120.0050.02815.70
5.5.110.0060.03915.68
5.5.100.0030.03515.68
5.5.90.0080.03615.62
5.5.80.0050.03815.62
5.5.70.0050.03715.63
5.5.60.0060.04015.68
5.5.50.0030.02215.57
5.5.40.0050.04115.67
5.5.30.0070.03815.59
5.5.20.0000.03015.68
5.5.10.0050.02515.71
5.5.00.0070.04215.62
5.4.450.0050.03815.26
5.4.440.0080.04315.41
5.4.430.0020.04115.36
5.4.420.0060.04015.27
5.4.410.0070.03215.16
5.4.400.0030.04215.11
5.4.390.0000.02615.19
5.4.380.0000.02615.05
5.4.370.0020.04315.13
5.4.360.0060.03715.18
5.4.350.0020.04515.18
5.4.340.0060.03015.25
5.4.330.0030.00811.18
5.4.320.0040.03215.10
5.4.310.0050.02015.11
5.4.300.0050.04315.10
5.4.290.0070.03215.13
5.4.280.0020.03715.04
5.4.270.0030.03815.15
5.4.260.0000.04515.04
5.4.250.0030.04315.15
5.4.240.0050.03715.17
5.4.230.0080.04015.04
5.4.220.0060.02415.11
5.4.210.0050.03815.09
5.4.200.0080.02815.16
5.4.190.0050.03915.14
5.4.180.0050.02915.05
5.4.170.0030.03815.11
5.4.160.0020.04015.05
5.4.150.0030.03515.19
5.4.140.0060.03813.68
5.4.130.0030.04213.75
5.4.120.0000.03213.81
5.4.110.0020.04013.84
5.4.100.0050.03613.72
5.4.90.0080.02113.81
5.4.80.0050.03813.75
5.4.70.0110.03713.72
5.4.60.0060.03213.72
5.4.50.0070.03213.79
5.4.40.0010.02113.80
5.4.30.0040.01713.82
5.4.20.0040.03813.82
5.4.10.0010.02813.81
5.4.00.0040.02213.52
5.3.290.0060.04112.95
5.3.280.0040.03612.85
5.3.270.0040.04112.87
5.3.260.0030.04112.96
5.3.250.0000.04312.89
5.3.240.0050.04012.94
5.3.230.0050.03612.88
5.3.220.0050.02512.89
5.3.210.0020.04012.91
5.3.200.0040.04212.91
5.3.190.0020.03912.84
5.3.180.0030.02212.93
5.3.170.0000.02612.85
5.3.160.0050.02312.94
5.3.150.0020.03312.89
5.3.140.0020.02312.90
5.3.130.0020.03712.84
5.3.120.0040.02712.88
5.3.110.0040.04312.90
5.3.100.0000.04212.64
5.3.90.0030.04112.63
5.3.80.0030.04112.61
5.3.70.0050.02512.57
5.3.60.0000.02312.61
5.3.50.0030.03512.63
5.3.40.0060.03512.61
5.3.30.0070.03612.58
5.3.20.0050.03712.45
5.3.10.0040.03812.45
5.3.00.0010.04012.37
5.2.170.0030.03011.70
5.2.160.0020.02811.70
5.2.150.0050.03111.70
5.2.140.0050.01811.70
5.2.130.0040.02011.70
5.2.120.0060.02811.70
5.2.110.0030.02711.70
5.2.100.0030.03311.70
5.2.90.0020.03211.70
5.2.80.0070.03311.70
5.2.70.0030.03511.70
5.2.60.0000.02811.70
5.2.50.0030.01611.70
5.2.40.0000.01911.70
5.2.30.0040.01511.70
5.2.20.0040.01611.70
5.2.10.0030.02611.70
5.2.00.0000.01811.70
5.1.60.0000.01411.70
5.1.50.0040.01411.70
5.1.40.0000.01611.70
5.1.30.0000.01711.70
5.1.20.0040.01311.70
5.1.10.0000.01911.70
5.1.00.0000.01811.70
5.0.50.0000.01311.70
5.0.40.0030.01011.70
5.0.30.0000.01711.70
5.0.20.0020.01111.70
5.0.10.0000.01411.70
5.0.00.0000.01711.70
4.4.90.0000.02111.70
4.4.80.0010.01311.70
4.4.70.0010.01111.70
4.4.60.0020.01311.70
4.4.50.0020.02011.70
4.4.40.0030.01511.70
4.4.30.0000.01011.70
4.4.20.0020.00711.70
4.4.10.0030.01411.70
4.4.00.0030.01411.70
4.3.110.0020.00811.70
4.3.100.0020.01011.70
4.3.90.0000.01111.70
4.3.80.0050.02011.70
4.3.70.0010.01011.70
4.3.60.0000.01011.70
4.3.50.0010.01111.70
4.3.40.0000.01411.70
4.3.30.0020.01511.70
4.3.20.0020.00911.70
4.3.10.0000.01911.70
4.3.00.0000.01811.70

preferences:
53.78 ms | 401 KiB | 5 Q