3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'D:/Inetpub/v5.easylearn.ch/upload/content/4/3814_firstinsert.zip'; $searchTerm = "abcd"; $replaceTerm = "XXXX"; $test=array("${searchTerm}/${searchTerm}_.${searchTerm}", "xay${searchTerm}", "asdasd/${searchTerm}.mp3", "${searchTerm}.", "blahahbasd${searchTerm}", "1234${searchTerm}1234"); foreach ($test as $t) echo "$t => " . preg_replace("/". preg_quote($searchTerm) . "([^_.]|$)/x", preg_quote($replaceTerm) . "\${1}", $t) . "\n";

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.0110.01116.88
8.3.50.0170.00522.11
8.3.40.0070.00718.97
8.3.30.0150.00019.14
8.3.20.0040.00420.32
8.3.10.0050.00323.48
8.3.00.0080.00019.41
8.2.180.0090.01218.54
8.2.170.0090.00622.96
8.2.160.0110.00320.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0110.00019.73
8.2.120.0040.00426.35
8.2.110.0090.00020.53
8.2.100.0070.00418.03
8.2.90.0040.00419.17
8.2.80.0080.00017.97
8.2.70.0040.00417.75
8.2.60.0000.00818.04
8.2.50.0030.00518.07
8.2.40.0040.00419.27
8.2.30.0030.00620.65
8.2.20.0070.00317.71
8.2.10.0000.00818.20
8.2.00.0040.00418.16
8.1.280.0030.01225.92
8.1.270.0000.01023.91
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0000.01023.76
8.1.230.0090.00319.42
8.1.220.0040.00417.79
8.1.210.0030.00618.77
8.1.200.0050.00517.48
8.1.190.0030.00517.35
8.1.180.0000.00718.10
8.1.170.0000.00818.71
8.1.160.0000.00722.05
8.1.150.0040.00418.91
8.1.140.0000.00919.56
8.1.130.0000.00717.53
8.1.120.0040.00417.62
8.1.110.0050.00217.50
8.1.100.0060.00317.50
8.1.90.0040.00417.59
8.1.80.0000.00717.56
8.1.70.0000.00717.56
8.1.60.0050.00317.77
8.1.50.0050.00517.70
8.1.40.0030.00617.68
8.1.30.0000.01017.74
8.1.20.0000.00817.76
8.1.10.0050.00317.57
8.1.00.0030.00617.57
8.0.300.0000.00818.77
8.0.290.0050.00216.75
8.0.280.0000.00718.47
8.0.270.0030.00617.28
8.0.260.0030.00316.96
8.0.250.0040.00417.13
8.0.240.0000.00717.14
8.0.230.0030.00317.07
8.0.220.0040.00317.02
8.0.210.0000.00716.93
8.0.200.0000.00616.97
8.0.190.0040.00416.99
8.0.180.0000.00817.05
8.0.170.0050.00316.97
8.0.160.0000.00716.91
8.0.150.0070.00016.95
8.0.140.0070.00016.94
8.0.130.0000.00613.46
8.0.120.0040.00416.91
8.0.110.0000.00716.86
8.0.100.0040.00416.98
8.0.90.0040.00416.89
8.0.80.0070.01517.04
8.0.70.0040.00417.04
8.0.60.0070.00016.91
8.0.50.0040.00416.93
8.0.30.0120.00517.20
8.0.20.0110.00817.40
8.0.10.0000.00717.19
8.0.00.0080.01316.86
7.4.330.0000.00516.80
7.4.320.0030.00316.64
7.4.300.0000.00616.81
7.4.290.0000.00816.82
7.4.280.0000.00716.81
7.4.270.0000.00716.76
7.4.260.0040.00416.70
7.4.250.0030.00516.79
7.4.240.0020.00616.78
7.4.230.0000.00816.79
7.4.220.0090.00916.93
7.4.210.0100.00816.83
7.4.200.0040.00416.88
7.4.160.0120.00416.79
7.4.150.0080.00817.40
7.4.140.0180.00217.86
7.4.130.0130.00716.82
7.4.120.0100.00716.73
7.4.110.0140.00316.55
7.4.100.0090.00916.50
7.4.90.0070.01616.77
7.4.80.0070.00919.39
7.4.70.0100.00716.57
7.4.60.0070.01116.66
7.4.50.0100.00516.67
7.4.40.0070.01016.71
7.4.30.0100.01416.52
7.4.10.0100.01015.32
7.4.00.0130.00415.07
7.3.330.0000.00513.31
7.3.320.0000.00613.31
7.3.310.0070.00016.43
7.3.300.0070.00016.50
7.3.290.0060.00316.47
7.3.280.0080.00816.50
7.3.270.0100.00717.40
7.3.260.0120.00616.75
7.3.250.0150.00216.67
7.3.240.0090.00916.57
7.3.230.0060.00916.64
7.3.210.0140.00416.41
7.3.200.0110.00516.72
7.3.190.0100.00716.78
7.3.180.0100.01016.31
7.3.170.0090.01216.56
7.3.160.0100.00716.54
7.3.130.0090.00914.97
7.3.120.0050.01415.02
7.3.110.0030.01515.17
7.3.100.0030.01215.07
7.3.90.0050.01114.98
7.3.80.0070.00414.94
7.3.70.0080.00515.13
7.3.60.0030.01115.08
7.3.50.0110.00514.93
7.3.40.0020.00815.02
7.3.30.0050.01014.83
7.3.20.0080.00716.78
7.3.10.0060.00816.54
7.3.00.0030.01116.95
7.2.330.0000.01816.81
7.2.320.0060.01216.86
7.2.310.0080.00817.03
7.2.300.0030.01416.80
7.2.290.0150.00416.85
7.2.260.0060.01215.39
7.2.250.0030.01515.21
7.2.240.0020.01515.43
7.2.230.0050.00715.40
7.2.220.0050.01015.29
7.2.210.0050.01015.30
7.2.200.0040.00715.17
7.2.190.0090.00515.37
7.2.180.0050.01215.20
7.2.170.0050.01015.18
7.2.160.0060.01215.34
7.2.150.0100.00317.17
7.2.140.0000.00917.05
7.2.130.0070.00717.06
7.2.120.0140.00417.20
7.2.110.0070.01017.25
7.2.100.0060.00917.04
7.2.90.0000.01617.08
7.2.80.0070.01017.06
7.2.70.0030.00917.13
7.2.60.0050.00917.09
7.2.50.0050.00517.18
7.2.40.0060.01017.22
7.2.30.0060.00617.16
7.2.20.0030.01317.09
7.2.10.0060.00617.14
7.2.00.0100.00518.30
7.1.330.0030.01116.04
7.1.320.0080.00616.04
7.1.310.0050.00815.87
7.1.300.0020.01316.14
7.1.290.0080.00715.88
7.1.280.0050.01015.96
7.1.270.0090.00015.98
7.1.260.0070.00615.97
7.1.250.0130.00015.89
7.1.240.0060.00916.02
7.1.230.0070.00716.02
7.1.220.0060.00915.93
7.1.210.0070.01116.10
7.1.200.0080.00815.86
7.1.190.0040.00715.97
7.1.180.0070.00716.17
7.1.170.0070.00716.01
7.1.160.0030.00915.88
7.1.150.0090.00316.18
7.1.140.0040.00715.91
7.1.130.0060.00615.98
7.1.120.0080.00416.04
7.1.110.0030.01016.15
7.1.100.0070.00617.23
7.1.90.0000.01316.13
7.1.80.0000.00916.08
7.1.70.0010.01116.84
7.1.60.0080.01217.69
7.1.50.0050.00716.67
7.1.40.0060.00315.86
7.1.30.0000.01516.12
7.1.20.0040.01116.07
7.1.10.0110.00015.68
7.1.00.0050.04419.12
7.0.330.0110.00415.66
7.0.320.0110.00415.39
7.0.310.0030.00615.65
7.0.300.0040.01115.63
7.0.290.0110.00315.44
7.0.280.0090.00315.26
7.0.270.0040.00815.47
7.0.260.0060.00615.81
7.0.250.0030.00615.64
7.0.240.0070.00715.56
7.0.230.0110.00315.68
7.0.220.0070.00315.34
7.0.210.0060.00915.59
7.0.200.0090.01115.25
7.0.190.0030.00615.56
7.0.180.0040.00415.73
7.0.170.0070.00715.80
7.0.160.0100.00315.78
7.0.150.0030.01015.49
7.0.140.0030.00615.59
7.0.130.0070.01015.70
7.0.120.0060.00615.72
7.0.110.0040.01215.68
7.0.100.0070.00715.67
7.0.90.0000.01515.74
7.0.80.0030.01015.32
7.0.70.0060.00615.55
7.0.60.0140.04017.75
7.0.50.0050.02116.64
7.0.40.0130.02116.75
7.0.30.0110.02416.72
7.0.20.0130.02616.92
7.0.10.0070.03016.88
7.0.00.0020.05016.70
5.6.400.0030.00614.31
5.6.390.0030.01314.56
5.6.380.0030.01014.44
5.6.370.0030.00714.62
5.6.360.0100.00714.35
5.6.350.0040.00814.65
5.6.340.0070.00714.06
5.6.330.0090.00614.35
5.6.320.0040.00814.68
5.6.310.0000.01814.62
5.6.300.0040.00814.24
5.6.290.0030.01014.20
5.6.280.0050.04117.63
5.6.270.0100.00314.67
5.6.260.0030.01014.41
5.6.250.0060.00614.27
5.6.240.0070.00314.49
5.6.230.0030.01314.56
5.6.220.0050.00514.40
5.6.210.0030.02817.45
5.6.200.0030.02816.30
5.6.190.0070.03317.45
5.6.180.0130.02617.55
5.6.170.0080.03917.48
5.6.160.0120.02417.50
5.6.150.0110.04116.12
5.6.140.0050.02216.41
5.6.130.0090.04216.39
5.6.120.0050.04517.56
5.6.110.0060.04617.77
5.6.100.0060.02217.77
5.6.90.0070.04717.70
5.6.80.0080.04217.38
5.6.70.0070.00314.24
5.6.60.0030.01314.34
5.6.50.0060.01014.37
5.6.40.0030.00614.34
5.6.30.0050.00514.29
5.6.20.0000.01314.39
5.6.10.0030.01014.46
5.6.00.0060.00914.39
5.5.380.0100.00714.29
5.5.370.0000.01314.10
5.5.360.0000.01014.25
5.5.350.0120.03217.35
5.5.340.0020.02416.04
5.5.330.0090.03917.13
5.5.320.0040.04717.32
5.5.310.0080.02817.28
5.5.300.0120.02416.13
5.5.290.0060.03116.17
5.5.280.0070.04517.40
5.5.270.0080.04517.62
5.5.260.0030.02917.42
5.5.250.0050.04117.59
5.5.240.0080.04217.14
5.5.230.0070.00414.34
5.5.220.0000.00914.27
5.5.210.0040.01213.97
5.5.200.0000.01514.07
5.5.190.0080.00414.13
5.5.180.0030.01214.30
5.5.170.0070.00714.22
5.5.160.0040.00914.31
5.5.150.0070.01014.49
5.5.140.0030.01014.45
5.5.130.0070.00714.37
5.5.120.0070.00314.10
5.5.110.0070.00714.11
5.5.100.0000.01414.14
5.5.90.0030.00914.30
5.5.80.0060.00914.26
5.5.70.0000.00914.34
5.5.60.0130.00314.30
5.5.50.0040.01114.20
5.5.40.0040.01113.96
5.5.30.0070.01013.91
5.5.20.0060.00613.91
5.5.10.0040.00814.14
5.5.00.0000.01114.24

preferences:
65.84 ms | 401 KiB | 5 Q