3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sed(string $re, string $sub): string { if (mb_strlen($re, "8bit") < 4 || $re[0] !== "s") throw new Error("Your syntax is invalid, go drown yourself"); [1 => $re, 2 => $rep, 3 => $mod] = preg_split("|(?<!\\\\){$re[1]}|", $re); $re = str_replace('@', '\@', $re); return preg_replace("@$re@$mod", $rep, $sub); } echo sed('s/@FOO\/BAR@/waa/i', 'wee/@foo/bar@/woo'), PHP_EOL;

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.0180.00016.75
8.3.50.0110.00416.52
8.3.40.0060.00919.05
8.3.30.0140.00418.85
8.3.20.0070.00420.30
8.3.10.0050.00323.61
8.3.00.0000.00823.63
8.2.180.0090.00618.55
8.2.170.0150.00322.96
8.2.160.0070.00720.28
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00422.10
8.2.120.0040.00426.35
8.2.110.0060.00319.37
8.2.100.0110.00017.91
8.2.90.0040.00419.30
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0040.00418.16
8.2.50.0040.00418.10
8.2.40.0000.00920.59
8.2.30.0000.00719.39
8.2.20.0040.00419.95
8.2.10.0000.00818.22
8.2.00.0040.00418.07
8.1.280.0110.00325.92
8.1.270.0080.00023.91
8.1.260.0100.00326.35
8.1.250.0000.00828.09
8.1.240.0040.00422.74
8.1.230.0080.00417.70
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0050.00517.47
8.1.190.0100.00017.40
8.1.180.0030.00618.10
8.1.170.0040.00418.77
8.1.160.0040.00418.84
8.1.150.0050.00218.91
8.1.140.0080.00019.60
8.1.130.0070.00018.84
8.1.120.0000.00717.58
8.1.110.0000.00817.64
8.1.100.0040.00417.52
8.1.90.0040.00417.45
8.1.80.0040.00417.64
8.1.70.0000.00717.56
8.1.60.0040.00417.72
8.1.50.0060.00317.71
8.1.40.0000.00817.67
8.1.30.0040.00417.86
8.1.20.0000.00817.78
8.1.10.0040.00417.80
8.1.00.0000.00717.70
8.0.300.0040.00818.77
8.0.290.0070.00016.88
8.0.280.0040.00418.45
8.0.270.0030.00317.33
8.0.260.0000.00716.91
8.0.250.0000.00817.09
8.0.240.0030.00317.19
8.0.230.0030.00317.10
8.0.220.0070.00017.05
8.0.210.0000.00817.15
8.0.200.0000.00617.05
8.0.190.0050.00317.14
8.0.180.0000.00717.13
8.0.170.0000.00817.12
8.0.160.0040.00417.14
8.0.150.0080.00017.00
8.0.140.0030.00317.08
8.0.130.0030.00313.57
8.0.120.0040.00416.96
8.0.110.0080.00016.95
8.0.100.0050.00317.14
8.0.90.0000.00817.07
8.0.80.0060.00917.00
8.0.70.0000.00817.15
8.0.60.0000.00817.17
8.0.50.0040.00417.11
8.0.30.0080.00917.24
8.0.20.0100.01017.40
8.0.10.0000.00717.16
8.0.00.0130.00316.82
7.4.330.0050.00016.79
7.4.320.0000.00616.82
7.4.300.0050.00216.82
7.4.290.0040.00416.81
7.4.280.0050.00316.83
7.4.270.0080.00016.86
7.4.260.0040.00416.77
7.4.250.0050.00316.78
7.4.240.0050.00216.79
7.4.230.0000.00816.56
7.4.220.0090.00916.86
7.4.210.0090.00916.80
7.4.200.0000.00816.70
7.4.160.0150.00516.75
7.4.150.0120.00617.40
7.4.140.0110.01017.86
7.4.130.0090.00916.70
7.4.120.0090.00916.66
7.4.110.0150.00316.76
7.4.100.0090.00916.75
7.4.90.0070.01116.85
7.4.80.0100.00719.39
7.4.70.0130.01116.75
7.4.60.0090.00616.64
7.4.50.0100.00616.49
7.4.40.0110.00716.76
7.4.30.0130.00716.73
7.4.00.0070.00714.99
7.3.330.0050.00313.52
7.3.320.0030.00213.54
7.3.310.0000.00716.38
7.3.300.0000.00716.58
7.3.290.0030.00316.49
7.3.280.0070.00816.53
7.3.270.0100.00717.40
7.3.260.0130.00316.55
7.3.250.0090.00816.64
7.3.240.0130.01016.70
7.3.230.0140.00316.58
7.3.210.0170.00716.82
7.3.200.0120.00316.81
7.3.190.0080.00816.66
7.3.180.0090.00916.43
7.3.170.0170.00416.52
7.3.160.0140.00716.60
7.3.10.0120.00316.58
7.3.00.0080.00916.78
7.2.330.0060.01216.88
7.2.320.0170.00716.72
7.2.310.0070.01016.93
7.2.300.0060.01516.85
7.2.290.0100.00616.80
7.2.130.0120.00517.00
7.2.120.0130.00717.09
7.2.110.0070.01017.13
7.2.100.0100.01016.78
7.2.90.0150.00917.00
7.2.80.0130.00616.99
7.2.70.0130.00916.94
7.2.60.0090.00516.94
7.2.50.0050.01116.89
7.2.40.0130.00616.77
7.2.30.0110.00716.74
7.2.20.0060.01316.96
7.2.10.0110.00616.62
7.2.00.0110.00716.81
7.1.250.0070.01015.85
7.1.200.0030.00915.89
7.1.110.0170.00716.83
7.1.100.0170.00316.53
7.1.90.0160.01016.54
7.1.80.0100.01316.61
7.1.70.0220.00715.62
7.1.60.0260.01433.66
7.1.50.0310.00333.46
7.1.40.0210.01133.16
7.1.30.0240.01233.01
7.1.20.0120.01933.14
7.1.10.0140.01014.95
7.1.00.0140.00715.13
7.0.250.0150.00615.57
7.0.240.0120.00915.88
7.0.230.0220.00715.59
7.0.220.0130.01015.39
7.0.210.0400.01514.79
7.0.200.0060.01314.72
7.0.190.0100.01014.57
7.0.180.0040.01414.05
7.0.170.0100.01014.07
7.0.160.0100.01014.23
7.0.150.0110.01114.18
7.0.140.0110.01114.42
7.0.130.0100.01314.41
7.0.120.0150.00814.40
7.0.110.0130.01014.48
7.0.100.0130.00614.22
7.0.90.0100.01014.28
7.0.80.0170.01614.37
7.0.70.0150.00714.18
7.0.60.0100.01014.01
7.0.50.0120.00614.31
7.0.40.0710.00714.54
7.0.30.0110.00714.18
7.0.20.0100.01014.35
7.0.10.0100.01014.40
7.0.00.0100.01014.14

preferences:
56.62 ms | 400 KiB | 5 Q