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 + 4) . ' # ' . substr($itemFullName, $end); 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.0040.01118.43
8.3.50.0130.00822.18
8.3.40.0070.00718.96
8.3.30.0070.00719.22
8.3.20.0000.00820.15
8.3.10.0040.00421.92
8.3.00.0040.00422.46
8.2.180.0090.00616.74
8.2.170.0070.00722.96
8.2.160.0100.00319.20
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0140.00326.16
8.2.120.0050.00319.48
8.2.110.0060.00322.13
8.2.100.0120.00019.76
8.2.90.0040.00419.27
8.2.80.0030.00617.97
8.2.70.0030.00517.75
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0000.00818.34
8.2.30.0040.00418.06
8.2.20.0040.00417.65
8.2.10.0000.00717.91
8.2.00.0000.00717.82
8.1.280.0090.00625.92
8.1.270.0080.00022.14
8.1.260.0000.00726.35
8.1.250.0090.00028.09
8.1.240.0030.00623.96
8.1.230.0100.00019.22
8.1.220.0030.00517.80
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0080.00017.28
8.1.180.0080.00018.57
8.1.170.0040.00418.84
8.1.160.0030.00322.22
8.1.150.0000.00818.68
8.1.140.0090.00317.62
8.1.130.0000.00717.77
8.1.120.0030.00417.62
8.1.110.0040.00417.53
8.1.100.0070.00017.70
8.1.90.0000.00717.63
8.1.80.0030.00317.66
8.1.70.0030.00317.62
8.1.60.0030.00617.70
8.1.50.0050.00217.71
8.1.40.0040.00417.71
8.1.30.0050.00217.66
8.1.20.0030.00617.75
8.1.10.0040.00417.71
8.1.00.0050.00317.64
8.0.300.0070.00018.77
8.0.290.0050.00217.43
8.0.280.0030.00318.36
8.0.270.0070.00017.24
8.0.260.0030.00316.93
8.0.250.0000.00717.15
8.0.240.0000.00817.01
8.0.230.0000.00717.07
8.0.220.0030.00316.96
8.0.210.0040.00416.99
8.0.200.0050.00317.00
8.0.190.0000.00817.08
8.0.180.0000.00717.02
8.0.170.0000.00717.06
8.0.160.0040.00417.06
8.0.150.0030.00717.10
8.0.140.0000.00816.98
8.0.130.0060.00013.52
8.0.120.0030.00517.05
8.0.110.0040.00417.14
8.0.100.0030.00417.00
8.0.90.0040.00417.07
8.0.80.0060.00917.05
8.0.70.0040.00417.10
8.0.60.0000.00717.08
8.0.50.0070.00016.86
8.0.30.0100.00917.41
8.0.20.0100.00917.40
8.0.10.0000.00717.29
8.0.00.0090.00816.96
7.4.330.0000.00515.00
7.4.320.0000.00716.65
7.4.300.0000.00716.77
7.4.290.0040.00416.85
7.4.280.0030.00316.71
7.4.270.0000.00816.71
7.4.260.0000.00716.76
7.4.250.0000.00716.80
7.4.240.0060.00216.79
7.4.230.0070.00016.59
7.4.220.0060.01216.69
7.4.210.0070.01216.72
7.4.200.0000.00716.71
7.4.190.0040.00416.87
7.4.160.0040.01216.86
7.4.150.0140.00417.40
7.4.140.0120.00717.86
7.4.130.0130.00716.70
7.4.120.0080.01016.66
7.4.110.0090.00916.72
7.4.100.0110.00516.66
7.4.90.0100.00716.63
7.4.80.0120.01219.39
7.4.70.0090.01216.74
7.4.60.0110.00616.80
7.4.50.0000.00916.63
7.4.40.0040.01422.77
7.4.30.0130.00716.83
7.4.00.0070.00715.10
7.3.330.0060.00013.32
7.3.320.0020.00213.27
7.3.310.0030.00316.53
7.3.300.0040.00416.45
7.3.290.0070.01016.46
7.3.280.0060.01016.44
7.3.270.0100.00917.40
7.3.260.0100.01016.41
7.3.250.0150.00516.42
7.3.240.0100.00716.86
7.3.230.0070.01016.57
7.3.210.0170.00016.84
7.3.200.0150.00719.39
7.3.190.0030.01816.71
7.3.180.0040.01116.33
7.3.170.0100.00616.53
7.3.160.0100.00616.55
7.3.120.0000.01414.88
7.3.10.0060.00616.95
7.3.00.0000.01616.71
7.2.330.0030.01316.75
7.2.320.0120.01216.80
7.2.310.0120.00616.88
7.2.300.0130.00316.66
7.2.290.0030.01416.77
7.2.130.0140.00517.13
7.2.120.0110.00616.94
7.2.110.0120.00617.10
7.2.100.0030.01216.93
7.2.90.0030.01217.21
7.2.80.0060.00617.14
7.2.70.0030.00916.70
7.2.60.0050.00817.11
7.2.50.0090.00317.09
7.2.40.0000.01016.72
7.2.30.0070.01017.17
7.2.20.0090.00616.98
7.2.10.0130.00717.16
7.2.00.0140.00717.15
7.1.250.0110.00415.89
7.1.240.0130.00315.92
7.1.230.0090.00915.88
7.1.220.0130.00315.58
7.1.210.0040.01115.71
7.1.200.0080.00316.01
7.1.190.0150.00315.86
7.1.180.0130.00615.68
7.1.170.0040.00415.98
7.1.160.0070.00715.84
7.1.150.0070.01015.60
7.1.140.0050.00515.75
7.1.130.0120.00315.95
7.1.120.0050.00515.86
7.1.110.0170.00315.96
7.1.100.0080.00517.08
7.1.90.0060.00915.58
7.1.80.0030.01315.87
7.1.70.0060.00616.47
7.1.60.0050.01517.78
7.1.50.0090.01116.36
7.1.40.0100.00315.82
7.1.30.0090.00615.98
7.1.20.0120.00615.69
7.1.10.0030.01015.99
7.1.00.0050.03719.18
7.0.330.0040.00815.19
7.0.320.0130.00715.42
7.0.310.0080.00515.50
7.0.300.0030.00815.38
7.0.290.0060.00915.34
7.0.280.0060.00315.42
7.0.270.0050.00515.48
7.0.260.0000.01415.30
7.0.250.0170.00315.83
7.0.240.0110.00415.68
7.0.230.0000.01415.61
7.0.220.0110.00415.13
7.0.210.0030.00615.74
7.0.200.0050.00915.98
7.0.190.0150.00615.51
7.0.180.0100.00315.66
7.0.170.0070.00315.71
7.0.160.0040.00415.29
7.0.150.0040.01115.51
7.0.140.0050.03818.64
7.0.130.0070.00715.74
7.0.120.0030.01015.52
7.0.110.0000.01415.39
7.0.100.0070.00715.20
7.0.90.0070.01015.64
7.0.80.0090.00315.66
7.0.70.0040.00815.49
7.0.60.0040.02417.86
7.0.50.0060.04516.50
7.0.40.0070.04516.94
7.0.30.0210.03616.93
7.0.20.0100.03116.86
7.0.10.0100.04416.94
7.0.00.0060.04616.73
5.6.380.0090.00614.38
5.6.370.0040.01114.45
5.6.360.0000.01414.49
5.6.350.0070.00714.43
5.6.340.0140.00014.33
5.6.330.0120.00314.25
5.6.320.0040.01114.42
5.6.310.0030.01214.55
5.6.300.0070.01014.68
5.6.290.0040.00414.30
5.6.280.0020.04217.74
5.6.270.0030.00614.59
5.6.260.0000.01414.31
5.6.250.0050.00814.57
5.6.240.0060.00914.48
5.6.230.0030.00814.21
5.6.220.0030.00514.46
5.6.210.0110.03917.39
5.6.200.0050.03016.12
5.6.190.0080.02817.26
5.6.180.2300.02417.36
5.6.170.0180.03817.32
5.6.160.0110.04017.27
5.6.150.0090.04216.17
5.6.140.0080.04116.28
5.6.130.0030.04416.21
5.6.120.0040.04417.81
5.6.110.0080.04017.58
5.6.100.0040.02417.54
5.6.90.0110.04217.65
5.6.80.0070.04117.21
5.6.70.2400.02017.25
5.6.60.0090.00914.30
5.6.50.0080.00814.44
5.6.40.0000.01314.13
5.6.30.0110.00413.80
5.6.20.0120.00314.22
5.6.10.0000.01714.42
5.6.00.0000.00914.16
5.5.380.0070.00310.90
5.5.370.0040.00411.06
5.5.360.0060.00611.24
5.5.350.0250.03015.87
5.5.340.0080.04214.54
5.5.330.0020.02815.73
5.5.320.1590.02315.51
5.5.310.0150.04015.50
5.5.300.0110.04014.59
5.5.290.0080.02514.50
5.5.280.0060.02015.94
5.5.270.0050.03115.93
5.5.260.0130.03815.82
5.5.250.0060.04815.82
5.5.240.0170.03815.44
5.5.230.0030.00611.05
5.5.220.0050.00811.02
5.5.210.0030.00310.51
5.5.200.0000.01111.08
5.5.190.0030.00911.08
5.5.180.0000.01110.81
5.5.170.0000.01310.75
5.5.160.0060.00610.90
5.5.150.0030.00610.74
5.5.140.0030.00910.88
5.5.130.0000.00610.96
5.5.120.0060.00010.85
5.5.110.0040.00710.88
5.5.100.0080.00311.05
5.5.90.0040.00710.83
5.5.80.0030.00610.93
5.5.70.0000.01010.78
5.5.60.0030.00710.95
5.5.50.0130.00011.14
5.5.40.0000.01110.81
5.5.30.0000.01311.13
5.5.20.0000.01211.05
5.5.10.0060.00611.25
5.5.00.0040.00710.88
5.4.450.0030.03515.33
5.4.440.0370.04115.30
5.4.430.0270.03414.86
5.4.420.0130.03115.06
5.4.410.0180.03715.18
5.4.400.0470.00414.90
5.4.390.0410.00314.87
5.4.380.0170.03114.94
5.4.370.0480.02814.82
5.4.360.0510.03114.90
5.4.350.0420.03014.88
5.4.340.0420.03414.84
5.4.330.0100.00710.95
5.4.320.0050.02011.86
5.4.310.0050.02811.79
5.4.300.0050.02511.81
5.4.290.0070.02611.66
5.4.280.0060.02511.53
5.4.270.0080.02511.62
5.4.260.0040.02311.80
5.4.250.0040.02311.72
5.4.240.0040.02611.64
5.4.230.0070.02011.69
5.4.220.0060.01911.62
5.4.210.0060.02211.69
5.4.200.0060.02311.65
5.4.190.0040.03315.00
5.4.180.0060.03015.05
5.4.170.0040.02814.77
5.4.160.0200.02814.87
5.4.150.0060.03014.78
5.4.140.0080.02713.63
5.4.130.0080.03313.69
5.4.120.0110.03413.71
5.4.110.0040.02913.75
5.4.100.0100.02213.70
5.4.90.0050.03013.59
5.4.80.0030.02713.59
5.4.70.0070.02513.67
5.4.60.0040.03113.60
5.4.50.0080.02713.74
5.4.40.0080.02313.63
5.4.30.0130.02213.53
5.4.20.0030.03013.62
5.4.10.0030.03113.70
5.4.00.0020.03113.49
5.3.290.0040.02911.71
5.3.280.0060.02711.60
5.3.270.0100.02212.52
5.3.260.0020.03112.40
5.3.250.0050.03012.42
5.3.240.0030.04012.59
5.3.230.0030.03112.48
5.3.220.0100.03212.40
5.3.210.0050.03312.45
5.3.200.0030.03012.48
5.3.190.0050.03012.51
5.3.180.0050.03012.39
5.3.170.0080.02812.32
5.3.160.0040.02912.54
5.3.150.0060.03312.51
5.3.140.0100.02612.62
5.3.130.0030.03212.44
5.3.120.0070.02812.49
5.3.110.0080.02812.48
5.3.100.0070.03612.27
5.3.90.0030.02812.15
5.3.80.0080.02312.18
5.3.70.0030.02612.18
5.3.60.0100.02212.11
5.3.50.0020.03012.02
5.3.40.0050.03312.20
5.3.30.0090.03212.13
5.3.20.0080.02212.12
5.3.10.0070.03011.84
5.3.00.0130.02211.80
5.2.170.0080.01810.34
5.2.160.0030.02310.31
5.2.150.0080.03010.32
5.2.140.0050.02310.30
5.2.130.0050.02310.17
5.2.120.0050.02310.21
5.2.110.0080.01810.25
5.2.100.0030.02310.18
5.2.90.0100.02510.20
5.2.80.0060.03110.22
5.2.70.0090.02310.25
5.2.60.0050.02710.12
5.2.50.0070.03010.04
5.2.40.0070.02810.15
5.2.30.0040.03410.24
5.2.20.0070.02010.10
5.2.10.0020.02510.10
5.2.00.0100.0259.81
5.1.60.0020.0219.46
5.1.50.0050.0189.35
5.1.40.0020.0219.32
5.1.30.0040.0179.66
5.1.20.0030.0219.51
5.1.10.0050.0189.36
5.1.00.0050.0189.51
5.0.50.0040.0148.63
5.0.40.0010.0168.66
5.0.30.0020.0248.46
5.0.20.0050.0138.52
5.0.10.0050.0138.51
5.0.00.0000.0278.49
4.4.90.0020.0127.29
4.4.80.0020.0177.28
4.4.70.0020.0147.26
4.4.60.0000.0157.29
4.4.50.0010.0137.28
4.4.40.0030.0167.28
4.4.30.0030.0127.34
4.4.20.0020.0147.26
4.4.10.0000.0157.29
4.4.00.0020.0187.28
4.3.110.0000.0147.25
4.3.100.0040.0167.30
4.3.90.0060.0117.24
4.3.80.0070.0127.21
4.3.70.0060.0087.22
4.3.60.0020.0127.23
4.3.50.0020.0127.25
4.3.40.0030.0177.23
4.3.30.0020.0107.17
4.3.20.0000.0157.17
4.3.10.0000.0157.17
4.3.00.0000.0147.85

preferences:
34.18 ms | 401 KiB | 5 Q