3v4l.org

run code in 300+ PHP versions simultaneously
<?php $itemFullName = "10-16X4 POLI MG SELF START BLK PLASTIC"; $itemAttributes = preg_replace("@POLI.+?BLK@", "#", $itemFullName); echo 'Regex: ' . $itemAttributes . "\n"; if (false !== ($start = strpos($itemFullName, 'POLI')) && false !== ($end = strpos($itemFullName, 'BLK', $start))) { $itemAttributes = substr($itemFullName, 0, $start) . ' # ' . substr($itemFullName, $end + 3); echo "strpos()/substr(): " . $itemAttributes; }

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.0140.00418.68
8.3.50.0140.00922.17
8.3.40.0070.00718.96
8.3.30.0120.00419.01
8.3.20.0040.00419.04
8.3.10.0040.00420.98
8.3.00.0000.00723.60
8.2.180.0070.01316.88
8.2.170.0060.00922.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00321.20
8.2.110.0050.00520.38
8.2.100.0070.00418.03
8.2.90.0040.00419.05
8.2.80.0000.00819.46
8.2.70.0000.00817.88
8.2.60.0030.00517.80
8.2.50.0080.00018.07
8.2.40.0000.00818.28
8.2.30.0040.00719.39
8.2.20.0000.00717.73
8.2.10.0040.00417.90
8.2.00.0040.00417.81
8.1.280.0110.00425.92
8.1.270.0050.00323.99
8.1.260.0110.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00422.46
8.1.230.0060.00620.96
8.1.220.0090.00018.77
8.1.210.0000.00818.89
8.1.200.0060.00317.35
8.1.190.0000.00817.54
8.1.180.0040.00418.10
8.1.170.0000.00718.79
8.1.160.0000.00718.84
8.1.150.0040.00418.88
8.1.140.0040.00417.53
8.1.130.0050.00317.86
8.1.120.0040.00417.62
8.1.110.0040.00417.47
8.1.100.0040.00417.58
8.1.90.0000.00717.50
8.1.80.0000.00717.53
8.1.70.0030.00317.61
8.1.60.0040.00417.68
8.1.50.0040.00417.54
8.1.40.0040.00417.67
8.1.30.0050.00217.83
8.1.20.0030.00517.79
8.1.10.0060.00317.74
8.1.00.0040.00717.50
8.0.300.0050.00220.08
8.0.290.0000.00817.30
8.0.280.0000.00718.54
8.0.270.0000.00717.36
8.0.260.0000.00816.98
8.0.250.0080.00017.13
8.0.240.0050.00317.11
8.0.230.0000.00717.10
8.0.220.0030.00617.10
8.0.210.0030.00316.96
8.0.200.0070.00017.10
8.0.190.0000.00817.07
8.0.180.0000.00717.13
8.0.170.0040.00417.01
8.0.160.0000.00716.97
8.0.150.0040.00417.04
8.0.140.0070.00017.03
8.0.130.0000.00513.48
8.0.120.0040.00417.06
8.0.110.0030.00517.09
8.0.100.0070.00017.06
8.0.90.0040.00416.94
8.0.80.0090.00617.04
8.0.70.0000.00716.96
8.0.60.0050.00217.09
8.0.50.0070.00017.12
8.0.30.0170.00317.33
8.0.20.0130.01017.51
8.0.10.0060.00317.16
8.0.00.0100.01016.80
7.4.330.0060.00016.85
7.4.320.0040.00416.84
7.4.300.0000.00716.88
7.4.290.0040.00416.87
7.4.280.0000.00816.72
7.4.270.0030.00716.79
7.4.260.0050.00013.61
7.4.250.0040.00416.72
7.4.240.0000.00816.63
7.4.230.0030.00316.63
7.4.220.0070.01316.58
7.4.210.0080.01116.79
7.4.200.0040.00416.82
7.4.190.0000.00716.70
7.4.160.0060.01016.79
7.4.150.0080.00817.40
7.4.140.0100.00817.86
7.4.130.0110.00816.60
7.4.120.0090.00916.80
7.4.110.0070.01016.81
7.4.100.0140.00316.70
7.4.90.0090.01016.65
7.4.80.0070.01019.39
7.4.70.0060.01216.60
7.4.60.0060.01116.64
7.4.50.0000.00916.59
7.4.40.0040.01522.77
7.4.30.0100.00616.68
7.4.00.0070.01114.84
7.3.330.0000.00613.33
7.3.320.0060.00013.27
7.3.310.0000.00716.43
7.3.300.0000.00716.48
7.3.290.0170.00316.38
7.3.280.0070.01016.45
7.3.270.0140.00317.40
7.3.260.0130.00518.24
7.3.250.0120.00716.49
7.3.240.0100.01316.84
7.3.230.0030.01316.78
7.3.210.0190.00016.46
7.3.200.0070.01119.39
7.3.190.0060.01116.47
7.3.180.0080.01116.49
7.3.170.0030.01316.83
7.3.160.0090.00616.76
7.3.120.0090.00614.91
7.3.10.0040.01116.76
7.3.00.0040.00916.63
7.2.330.0100.00716.64
7.2.320.0140.00316.88
7.2.310.0070.01116.85
7.2.300.0110.01116.86
7.2.290.0170.00716.79
7.2.130.0050.01017.00
7.2.120.0060.00717.05
7.2.110.0110.00516.96
7.2.100.0070.00717.06
7.2.90.0060.00917.07
7.2.80.0070.00617.13
7.2.70.0110.00317.22
7.2.60.0080.00617.11
7.2.50.0070.00717.19
7.2.40.0060.00617.12
7.2.30.0030.01317.11
7.2.20.0090.00417.02
7.2.10.0010.00917.10
7.2.00.0090.00717.10
7.1.250.0020.01215.85
7.1.240.0090.00616.00
7.1.230.0070.00715.95
7.1.220.0090.00615.74
7.1.210.0100.00715.77
7.1.200.0030.01015.78
7.1.190.0000.01015.93
7.1.180.0070.01015.77
7.1.170.0090.00615.91
7.1.160.0060.00616.07
7.1.150.0070.01015.95
7.1.140.0070.00415.91
7.1.130.0040.00415.86
7.1.120.0110.00016.04
7.1.110.0000.01015.77
7.1.100.0090.00616.09
7.1.90.0060.00616.09
7.1.80.0090.00315.95
7.1.70.0060.00416.80
7.1.60.0030.00616.87
7.1.50.0030.01016.44
7.1.40.0080.00515.95
7.1.30.0100.00315.72
7.1.20.0030.00915.84
7.1.10.0060.00615.95
7.1.00.0020.02219.09
7.0.330.0000.01115.55
7.0.320.0110.00015.36
7.0.310.0040.00815.49
7.0.300.0040.00815.45
7.0.290.0030.00815.34
7.0.280.0110.00015.29
7.0.270.0060.00615.49
7.0.260.0060.00615.43
7.0.250.0090.00415.60
7.0.240.0090.00315.66
7.0.230.0070.00715.71
7.0.220.0000.01115.53
7.0.210.0030.01315.72
7.0.200.0060.00916.21
7.0.190.0090.00015.27
7.0.180.0100.00715.44
7.0.170.0000.00815.23
7.0.160.0070.01115.73
7.0.150.0070.01015.31
7.0.140.0080.03518.91
7.0.130.0040.00815.57
7.0.120.0070.00715.50
7.0.110.0120.00015.73
7.0.100.0040.00715.54
7.0.90.0050.00515.52
7.0.80.0180.02417.81
7.0.70.0210.04317.67
7.0.60.0210.03517.82
7.0.50.0070.04217.85
7.0.40.0070.04016.94
7.0.30.0140.03516.67
7.0.20.0100.03716.92
7.0.10.0100.04316.70
7.0.00.0110.04516.81
5.6.380.0070.00714.61
5.6.370.0080.00414.21
5.6.360.0040.01114.27
5.6.350.0070.00414.34
5.6.340.0070.00714.05
5.6.330.0120.00314.27
5.6.320.0060.00714.41
5.6.310.0030.00914.65
5.6.300.0080.00414.29
5.6.290.0110.00614.19
5.6.280.0030.04217.77
5.6.270.0090.00614.28
5.6.260.0040.01114.21
5.6.250.0080.00414.34
5.6.240.0040.00714.49
5.6.230.0070.04617.52
5.6.220.0140.03717.47
5.6.210.0030.05017.48
5.6.200.0110.04117.65
5.6.190.0110.03917.62
5.6.180.0100.03817.71
5.6.170.0070.04217.67
5.6.160.0080.04317.69
5.6.150.0100.02717.68
5.6.140.0050.03717.63
5.6.130.0130.04117.46
5.6.120.0050.03317.56
5.6.110.0050.04317.69
5.6.100.0030.03617.59
5.6.90.0110.03217.62
5.6.80.0110.03617.32
5.6.70.0050.04517.38
5.6.60.0030.02817.25
5.6.50.0110.03117.33
5.6.40.0070.04417.22
5.6.30.0050.04717.15
5.6.20.0020.02817.34
5.6.10.0080.03817.23
5.6.00.0030.03817.23
5.5.380.0110.00011.06
5.5.370.0150.03715.71
5.5.360.0040.04515.77
5.5.350.0050.04915.74
5.5.340.0050.04616.00
5.5.330.0100.02315.92
5.5.320.0050.04015.99
5.5.310.0090.03515.97
5.5.300.0020.02715.96
5.5.290.0090.02915.94
5.5.280.0070.03915.98
5.5.270.0070.04715.90
5.5.260.0080.04416.04
5.5.250.0150.03715.83
5.5.240.0070.03515.66
5.5.230.0100.04015.60
5.5.220.0090.03915.65
5.5.210.0070.04015.67
5.5.200.0120.03015.62
5.5.190.0070.04015.62
5.5.180.0030.03215.65
5.5.170.0120.00011.06
5.5.160.0100.04215.54
5.5.150.0020.04715.67
5.5.140.0080.04015.63
5.5.130.0020.03415.59
5.5.120.0060.04415.51
5.5.110.0150.03215.65
5.5.100.0050.04415.58
5.5.90.0080.02515.57
5.5.80.0080.04215.57
5.5.70.0050.04315.60
5.5.60.0030.04515.50
5.5.50.0060.03915.61
5.5.40.0080.03915.59
5.5.30.0090.03915.59
5.5.20.0000.03315.55
5.5.10.0080.01715.55
5.5.00.0060.03915.54
5.4.450.0050.04315.26
5.4.440.0010.04615.18
5.4.430.0070.04515.15
5.4.420.0030.04315.23
5.4.410.0050.04115.29
5.4.400.0090.03615.00
5.4.390.0050.02815.07
5.4.380.0050.03715.15
5.4.370.0080.02115.05
5.4.360.0000.04714.92
5.4.350.0060.03515.07
5.4.340.0060.02514.94
5.4.330.0080.00011.06
5.4.320.0030.03215.01
5.4.310.0030.04015.02
5.4.300.0000.02915.01
5.4.290.0040.04214.94
5.4.280.0130.01715.04
5.4.270.0040.02815.08
5.4.260.0150.02714.98
5.4.250.0080.04115.12
5.4.240.0060.02615.08
5.4.230.0000.02715.10
5.4.220.0040.04315.06
5.4.210.0020.02515.06
5.4.200.0050.04014.95
5.4.190.0030.04115.07
5.4.180.0020.02414.93
5.4.170.0030.03914.93
5.4.160.0110.03715.13
5.4.150.0030.04514.97
5.4.140.0060.04213.70
5.4.130.0030.04113.66
5.4.120.0040.03613.67
5.4.110.0090.03513.74
5.4.100.0070.04013.75
5.4.90.0110.03513.66
5.4.80.0050.04313.65
5.4.70.0080.03413.63
5.4.60.0100.03413.63
5.4.50.0020.03913.65
5.4.40.0080.03513.68
5.4.30.0000.04313.67
5.4.20.0080.03513.64
5.4.10.0030.03813.74
5.4.00.0050.03813.42
5.3.290.0020.04412.83
5.3.280.0050.04312.74
5.3.270.0060.04412.83
5.3.260.0060.03312.80
5.3.250.0030.03812.74
5.3.240.0060.03812.82
5.3.230.0050.03812.75
5.3.220.0030.04512.73
5.3.210.0050.04312.81
5.3.200.0110.03212.79
5.3.190.0030.03312.72
5.3.180.0080.03512.79
5.3.170.0050.04212.74
5.3.160.0060.03812.79
5.3.150.0030.02312.72
5.3.140.0060.02012.80
5.3.130.0070.04112.79
5.3.120.0050.04212.73
5.3.110.0070.03712.73
5.3.100.0070.03212.52
5.3.90.0000.02812.54
5.3.80.0060.03912.51
5.3.70.0020.04412.54
5.3.60.0010.03312.51
5.3.50.0080.03012.49
5.3.40.0060.02812.44
5.3.30.0080.03212.48
5.3.20.0050.04012.32
5.3.10.0010.03312.35
5.3.00.0030.04312.35
5.2.170.0030.02112.32
5.2.160.0030.02612.32
5.2.150.0000.03512.32
5.2.140.0010.03612.32
5.2.130.0070.03212.32
5.2.120.0040.03012.32
5.2.110.0000.03212.32
5.2.100.0070.03212.32
5.2.90.0020.03112.32
5.2.80.0090.02712.32
5.2.70.0020.03312.32
5.2.60.0070.03312.32
5.2.50.0030.03712.32
5.2.40.0060.03412.32
5.2.30.0070.02812.32
5.2.20.0000.02912.32
5.2.10.0030.03212.32
5.2.00.0050.02812.32
5.1.60.0050.01512.32
5.1.50.0020.02512.32
5.1.40.0040.02812.32
5.1.30.0030.02812.32
5.1.20.0050.02612.32
5.1.10.0030.02112.32
5.1.00.0000.02412.32
5.0.50.0060.01712.32
5.0.40.0050.02212.32
5.0.30.0040.02812.32
5.0.20.0030.02312.32
5.0.10.0050.02312.32
5.0.00.0050.03212.32
4.4.90.0020.01112.32
4.4.80.0020.02012.32
4.4.70.0020.02012.32
4.4.60.0000.02012.32
4.4.50.0020.02012.32
4.4.40.0020.02612.32
4.4.30.0020.02012.32
4.4.20.0030.01412.32
4.4.10.0020.02012.32
4.4.00.0030.02612.32
4.3.110.0030.01812.32
4.3.100.0020.01812.32
4.3.90.0010.01612.32
4.3.80.0060.02812.32
4.3.70.0050.01612.32
4.3.60.0020.01612.32
4.3.50.0050.01812.32
4.3.40.0030.02512.32
4.3.30.0020.01412.32
4.3.20.0000.01612.32
4.3.10.0020.02112.32
4.3.00.0030.01812.32

preferences:
48.87 ms | 401 KiB | 5 Q