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.0120.00317.00
8.3.50.0160.00917.64
8.3.40.0120.00318.85
8.3.30.0150.00318.88
8.3.20.0000.00818.90
8.3.10.0090.00020.84
8.3.00.0120.00319.50
8.2.180.0040.01518.54
8.2.170.0100.00322.96
8.2.160.0030.01020.38
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0080.00020.59
8.2.110.0060.00322.16
8.2.100.0040.00817.91
8.2.90.0050.00317.75
8.2.80.0030.00517.97
8.2.70.0000.00817.75
8.2.60.0050.00318.03
8.2.50.0090.00318.07
8.2.40.0000.00818.28
8.2.30.0030.00718.08
8.2.20.0030.00619.48
8.2.10.0000.00817.79
8.2.00.0060.00318.05
8.1.280.0060.00925.92
8.1.270.0110.00724.66
8.1.260.0030.00526.35
8.1.250.0000.00828.09
8.1.240.0040.00423.80
8.1.230.0080.00319.09
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.01017.39
8.1.180.0040.00418.10
8.1.170.0040.00418.75
8.1.160.0090.00018.94
8.1.150.0050.00218.71
8.1.140.0040.00417.53
8.1.130.0000.00717.87
8.1.120.0100.00017.68
8.1.110.0070.00017.58
8.1.100.0030.00517.63
8.1.90.0000.00717.65
8.1.80.0050.00217.60
8.1.70.0000.00717.50
8.1.60.0040.00417.75
8.1.50.0040.00417.66
8.1.40.0000.00817.70
8.1.30.0050.00317.84
8.1.20.0000.00817.72
8.1.10.0040.00417.59
8.1.00.0000.00717.60
8.0.300.0080.00019.68
8.0.290.0060.00316.63
8.0.280.0000.00718.44
8.0.270.0040.00417.18
8.0.260.0030.00316.98
8.0.250.0030.00517.15
8.0.240.0070.00017.02
8.0.230.0000.00717.02
8.0.220.0020.00517.06
8.0.210.0070.00017.06
8.0.200.0000.00617.09
8.0.190.0040.00417.10
8.0.180.0000.00717.09
8.0.170.0040.00416.91
8.0.160.0000.00816.95
8.0.150.0040.00417.08
8.0.140.0040.00416.96
8.0.130.0030.00313.44
8.0.120.0070.00017.01
8.0.110.0040.00417.11
8.0.100.0000.00716.94
8.0.90.0040.00417.12
8.0.80.0040.01817.02
8.0.70.0050.00217.18
8.0.60.0000.00717.07
8.0.50.0000.00716.93
8.0.30.0150.00617.36
8.0.20.0130.01917.24
8.0.10.0040.00417.18
8.0.00.0200.00316.90
7.4.330.0040.00013.22
7.4.320.0040.00416.63
7.4.300.0030.00316.63
7.4.290.0000.00716.80
7.4.280.0070.00016.82
7.4.270.0030.00316.84
7.4.260.0030.00313.50
7.4.250.0040.00416.72
7.4.240.0070.00016.69
7.4.230.0000.00716.66
7.4.220.0130.01016.80
7.4.210.0060.00816.84
7.4.200.0000.00716.91
7.4.190.0030.00316.60
7.4.160.0120.00316.71
7.4.150.0130.00916.77
7.4.140.0150.01116.63
7.4.130.0100.00716.80
7.4.120.0240.00016.47
7.4.110.0070.01416.76
7.4.100.0070.01016.63
7.4.90.0100.01316.57
7.4.80.0090.00919.39
7.4.70.0070.01416.65
7.4.60.0070.01016.66
7.4.50.0000.00616.84
7.4.40.0090.00616.55
7.4.30.0060.00916.62
7.4.00.0070.00915.23
7.3.330.0030.00313.32
7.3.320.0030.00313.28
7.3.310.0070.00016.53
7.3.300.0030.00316.42
7.3.290.0050.00916.49
7.3.280.0110.00516.43
7.3.270.0130.00316.72
7.3.260.0140.00416.51
7.3.250.0080.01216.58
7.3.240.0070.01016.41
7.3.230.0110.01116.66
7.3.210.0090.00916.75
7.3.200.0090.01216.73
7.3.190.0080.00916.50
7.3.180.0060.01016.34
7.3.170.0120.00616.91
7.3.160.0030.01316.49
7.3.120.0030.01215.14
7.3.110.0110.00514.86
7.3.100.0070.00815.01
7.3.90.0050.00914.97
7.3.80.0070.00915.04
7.3.70.0070.00515.07
7.3.60.0050.00815.03
7.3.50.0050.00914.97
7.3.40.0060.00914.99
7.3.30.0060.00715.05
7.3.20.0070.00816.82
7.3.10.0060.00616.71
7.3.00.0090.00816.72
7.2.330.0150.00916.69
7.2.320.0100.01316.96
7.2.310.0100.01416.89
7.2.300.0100.00716.89
7.2.290.0140.00716.85
7.2.250.0100.00715.19
7.2.240.0090.00915.34
7.2.230.0030.01215.12
7.2.220.0030.01315.15
7.2.210.0070.01015.29
7.2.200.0060.00815.11
7.2.190.0040.00715.23
7.2.180.0060.00715.24
7.2.170.0040.01015.24
7.2.160.0070.00715.13
7.2.150.0040.01017.04
7.2.140.0050.00917.08
7.2.130.0040.00717.09
7.2.120.0070.00517.09
7.2.110.0080.00717.09
7.2.100.0080.00717.09
7.2.90.0090.00517.00
7.2.80.0090.00817.15
7.2.70.0060.00717.12
7.2.60.0070.01017.20
7.2.50.0060.00616.98
7.2.40.0090.00517.03
7.2.30.0070.00817.14
7.2.20.0070.00816.99
7.2.10.0050.01117.11
7.2.00.0080.00917.79
7.1.330.0070.00715.98
7.1.320.0060.00915.91
7.1.310.0020.01115.90
7.1.300.0060.00615.87
7.1.290.0070.00815.88
7.1.280.0110.00515.75
7.1.270.0080.00815.70
7.1.260.0050.00715.96
7.1.250.0100.00415.99
7.1.240.0040.00715.90
7.1.230.0020.01115.81
7.1.220.0050.00815.88
7.1.210.0050.00615.90
7.1.200.0030.01015.69
7.1.190.0030.01115.71
7.1.180.0020.01515.76
7.1.170.0050.00915.93
7.1.160.0050.00515.82
7.1.150.0020.01216.01
7.1.140.0120.00315.75
7.1.130.0090.00515.69
7.1.120.0070.00615.83
7.1.110.0030.01015.95
7.1.100.0070.00716.66
7.1.90.0110.00315.90
7.1.80.0070.00716.02
7.1.70.0040.00916.36
7.1.60.0080.00616.50
7.1.50.0090.00816.27
7.1.40.0080.00815.77
7.1.30.0070.00515.83
7.1.20.0020.01215.87
7.1.10.0030.01015.88
7.1.00.0100.02317.99
7.0.330.0090.00315.57
7.0.320.0070.00815.44
7.0.310.0050.01115.40
7.0.300.0040.01115.50
7.0.290.0080.00515.48
7.0.280.0060.00615.61
7.0.270.0070.00515.54
7.0.260.0000.01215.69
7.0.250.0030.01215.62
7.0.240.0040.00815.47
7.0.230.0030.01015.53
7.0.220.0110.00415.60
7.0.210.0090.00515.71
7.0.200.0040.00915.83
7.0.190.0080.00715.50
7.0.180.0080.00515.56
7.0.170.0070.00215.43
7.0.160.0050.00815.50
7.0.150.0080.00315.67
7.0.140.0030.03017.63
7.0.130.0060.00815.39
7.0.120.0050.02817.75
7.0.110.0080.00615.59
7.0.100.0060.00815.50
7.0.90.0070.00415.60
7.0.80.0040.01115.56
7.0.70.0030.01015.44
7.0.60.0060.02816.92
7.0.50.0120.02416.51
7.0.40.0040.02114.94
7.0.30.0060.02115.09
7.0.20.0090.02615.06
7.0.10.0080.02814.97
7.0.00.0080.02714.92
5.6.400.0050.00814.34
5.6.390.0030.01014.57
5.6.380.0090.00714.32
5.6.370.0020.01314.47
5.6.360.0060.00714.09
5.6.350.0050.00714.41
5.6.340.0030.00914.48
5.6.330.0030.00814.41
5.6.320.0030.00914.42
5.6.310.0060.00514.26
5.6.300.0070.00514.35
5.6.290.0060.00814.42
5.6.280.0040.03016.53
5.6.270.0070.00414.37
5.6.260.0050.00614.51
5.6.250.0070.00714.36
5.6.240.0070.00514.31
5.6.230.0020.00814.59
5.6.220.0040.00914.46
5.6.210.0060.02516.58
5.6.200.0060.03315.56
5.6.190.0070.03115.66
5.6.180.0080.02815.58
5.6.170.0070.02715.59
5.6.160.0060.03415.51
5.6.150.0080.02915.71
5.6.140.0080.03015.57
5.6.130.0050.02615.60
5.6.120.0030.02515.50
5.6.110.0010.02115.55
5.6.100.0080.01515.74
5.6.90.0030.02315.71
5.6.80.0100.01515.35
5.6.70.0070.01715.45
5.6.60.0070.01815.46
5.6.50.0040.01815.38
5.6.40.0080.01415.37
5.6.30.0020.01815.31
5.6.20.0060.02015.43
5.6.10.0020.01915.32
5.6.00.0040.02215.38
5.5.380.0040.00614.38
5.5.370.0030.00914.39
5.5.360.0070.00714.20
5.5.350.0160.03016.36
5.5.340.0030.03015.54
5.5.330.0070.02615.55
5.5.320.0090.02715.40
5.5.310.0050.02815.70
5.5.300.0040.03215.50
5.5.290.0040.02315.63
5.5.280.0080.01915.53
5.5.270.0030.02115.37
5.5.260.0040.01815.51
5.5.250.0050.01815.35
5.5.240.0050.01715.22
5.5.230.0050.01815.31
5.5.220.0040.01915.41
5.5.210.0040.01815.23
5.5.200.0050.01815.28
5.5.190.0070.01515.35
5.5.180.0060.01715.31
5.5.170.0040.00714.09
5.5.160.0040.01915.35
5.5.150.0020.01815.24
5.5.140.0040.01815.40
5.5.130.0050.01815.26
5.5.120.0070.02015.28
5.5.110.0060.01615.25
5.5.100.0010.02315.19
5.5.90.0050.01815.13
5.5.80.0030.01815.06
5.5.70.0040.01815.12
5.5.60.0050.01715.23
5.5.50.0070.02215.17
5.5.40.0070.03115.27
5.5.30.0030.02115.28
5.5.20.0050.03215.21
5.5.10.0050.03315.23
5.5.00.0050.03315.13
5.4.450.0090.02814.11
5.4.440.0000.02514.18
5.4.430.0030.02114.09
5.4.420.0030.01614.10
5.4.410.0040.01614.05
5.4.400.0030.01714.01
5.4.390.0060.01413.93
5.4.380.0060.02213.98
5.4.370.0050.01714.00
5.4.360.0020.01714.03
5.4.350.0040.01414.03
5.4.340.0020.01813.98
5.4.330.0070.00211.48
5.4.320.0030.01813.95
5.4.310.0030.01613.99
5.4.300.0060.01313.99
5.4.290.0050.01514.00
5.4.280.0020.01614.02
5.4.270.0060.01413.98
5.4.260.0040.01313.99
5.4.250.0070.01414.02
5.4.240.0060.01713.95
5.4.230.0070.01513.98
5.4.220.0030.01914.02
5.4.210.0040.01614.02
5.4.200.0040.02013.98
5.4.190.0070.02614.03
5.4.180.0100.02614.02
5.4.170.0060.02313.95
5.4.160.0070.02813.97
5.4.150.0030.03113.99
5.4.140.0070.02813.10
5.4.130.0030.02113.21
5.4.120.0090.01213.08
5.4.110.0050.01613.08
5.4.100.0060.01913.11
5.4.90.0050.01913.08
5.4.80.0030.03313.08
5.4.70.0040.02513.13
5.4.60.0050.01913.08
5.4.50.0040.02313.16
5.4.40.0040.03113.09
5.4.30.0050.02813.11
5.4.20.0080.02813.08
5.4.10.0070.02913.10
5.4.00.0040.02612.90
5.3.290.0060.01512.57
5.3.280.0050.01312.51
5.3.270.0050.03112.52
5.3.260.0070.02712.50
5.3.250.0040.02112.49
5.3.240.0080.02612.51
5.3.230.0030.03212.51
5.3.220.0070.01512.48
5.3.210.0050.01512.50
5.3.200.0040.02912.45
5.3.190.0070.02812.45
5.3.180.0030.02112.54
5.3.170.0050.02712.50
5.3.160.0030.03012.51
5.3.150.0070.02712.45
5.3.140.0050.02812.46
5.3.130.0030.02912.48
5.3.120.0030.03412.53
5.3.110.0040.03112.43
5.3.100.0010.03212.32
5.3.90.0050.02912.31
5.3.80.0070.02712.32
5.3.70.0070.02812.25
5.3.60.0040.03012.30
5.3.50.0030.03112.29
5.3.40.0050.01912.29
5.3.30.0060.02212.28
5.3.20.0050.02912.20
5.3.10.0040.02512.18
5.3.00.0050.02712.19
5.2.170.0070.05711.13
5.2.160.0000.03310.96
5.2.150.0000.07011.12
5.2.140.0000.05710.96
5.2.130.0070.06311.09
5.2.120.0070.03011.00
5.2.110.0030.06011.07
5.2.100.0070.03711.06
5.2.90.0000.03311.08
5.2.80.0030.06310.91
5.2.70.0070.05011.09
5.2.60.0070.05011.03
5.2.50.0070.03710.84
5.2.40.0000.07011.04
5.2.30.0070.03710.96
5.2.20.0070.03010.84
5.2.10.0130.05710.89
5.2.00.0000.03710.70
5.1.60.0030.02710.16
5.1.50.0000.02710.16
5.1.40.0100.05010.16
5.1.30.0000.04710.36
5.1.20.0100.05010.49
5.1.10.0030.05010.16
5.1.00.0000.06010.21
5.0.50.0070.03710.16
5.0.40.0030.04710.16
5.0.30.0000.03710.16
5.0.20.0070.02710.16
5.0.10.0070.04310.16
5.0.00.0100.05710.16
4.4.90.0000.03010.16
4.4.80.0000.03710.16
4.4.70.0000.03010.16
4.4.60.0000.02310.16
4.4.50.0030.03710.16
4.4.40.0000.02710.16
4.4.30.0000.01710.16
4.4.20.0030.02010.16
4.4.10.0030.03710.16
4.4.00.0000.05710.16
4.3.110.0070.02710.16
4.3.100.0000.03310.16
4.3.90.0100.02710.16
4.3.80.0030.05010.16
4.3.70.0070.03010.16
4.3.60.0070.02010.16
4.3.50.0030.03310.16
4.3.40.0070.04710.16
4.3.30.0030.03010.16
4.3.20.0000.02010.16
4.3.10.0000.03010.16
4.3.00.0000.04010.16

preferences:
52.65 ms | 401 KiB | 5 Q