3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'whatever text including some $text between delimiters$ and...'; $string_replaced = preg_replace_callback('/\$[^$]*\$/', function($m) { return preg_replace('~\s+~u', ':', $m[0]); }, $string); echo $string_replaced;

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.5.90.0100.00917.04
8.5.80.0070.00216.97
8.5.70.0050.00317.01
8.5.60.0030.00516.77
8.5.50.0030.00517.01
8.5.30.0110.00817.55
8.5.20.0110.00619.53
8.5.10.0110.00717.34
8.5.00.0160.01120.20
8.4.240.0130.00820.16
8.4.230.0060.00519.85
8.4.220.0090.01020.04
8.4.210.0120.00919.92
8.4.180.0170.00620.01
8.4.170.0120.01020.50
8.4.160.0110.01021.86
8.4.150.0060.00716.98
8.4.140.0110.01117.91
8.4.130.0110.01118.04
8.4.120.0130.00720.59
8.4.110.0120.00822.47
8.4.100.0120.00918.64
8.4.90.0150.00619.02
8.4.80.0150.00618.92
8.4.70.0130.00618.34
8.4.60.0110.00919.05
8.4.50.0120.00820.38
8.4.40.0100.01019.93
8.4.30.0100.01018.68
8.4.20.0130.00719.76
8.4.10.0050.00519.80
8.3.320.0120.00818.69
8.3.310.0100.00918.71
8.3.300.0050.00518.67
8.3.290.0110.00920.85
8.3.280.0110.01018.42
8.3.270.0080.01216.66
8.3.260.0160.00416.77
8.3.250.0110.00818.85
8.3.240.0130.00619.13
8.3.230.0120.00816.57
8.3.220.0030.00519.02
8.3.210.0110.00617.05
8.3.200.0050.00416.53
8.3.190.0080.00717.18
8.3.180.0120.00716.97
8.3.170.0140.00417.16
8.3.160.0090.00920.31
8.3.150.0070.01317.29
8.3.140.0100.00717.19
8.3.130.0100.00018.52
8.3.120.0060.00318.83
8.3.110.0070.00318.72
8.3.100.0060.00318.54
8.3.90.0150.00018.45
8.3.80.0060.00318.55
8.3.70.0040.01216.88
8.3.60.0060.01018.56
8.3.50.0120.00824.60
8.3.40.0140.00420.18
8.3.30.0090.00618.96
8.3.20.0050.00320.82
8.3.10.0060.00320.14
8.3.00.0080.00022.52
8.2.320.0110.01118.31
8.2.310.0120.01018.35
8.2.300.0110.01022.13
8.2.290.0090.01020.35
8.2.280.0140.00418.70
8.2.270.0120.00617.67
8.2.260.0110.00016.75
8.2.250.0000.00817.08
8.2.240.0050.00317.20
8.2.230.0040.00420.94
8.2.220.0000.00924.06
8.2.210.0150.00426.77
8.2.200.0070.00416.72
8.2.190.0060.01216.75
8.2.180.0120.00618.66
8.2.170.0110.00422.96
8.2.160.0100.00321.18
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00421.00
8.2.110.0100.00719.36
8.2.100.0090.00318.28
8.2.90.0030.00621.18
8.2.80.0090.00020.55
8.2.70.0030.00617.93
8.2.60.0000.00818.13
8.2.50.0080.00018.10
8.2.40.0030.00619.50
8.2.30.0040.00419.29
8.2.20.0030.00518.29
8.2.10.0050.00319.39
8.2.00.0040.00419.34
8.1.340.0160.00817.89
8.1.330.0120.00422.13
8.1.320.0090.01116.21
8.1.310.0030.00518.75
8.1.300.0090.00918.04
8.1.290.0030.00618.88
8.1.280.0140.00725.92
8.1.270.0040.00423.81
8.1.260.0030.00626.35
8.1.250.0060.00328.09
8.1.240.0030.00622.02
8.1.230.0110.00020.85
8.1.220.0040.00417.91
8.1.210.0000.00819.04
8.1.200.0030.00617.50
8.1.190.0040.00417.48
8.1.180.0080.00018.97
8.1.170.0030.00618.77
8.1.160.0000.00719.21
8.1.150.0070.00018.86
8.1.140.0040.00418.89
8.1.130.0020.00519.37
8.1.120.0020.00517.66
8.1.110.0040.00417.66
8.1.100.0000.00817.56
8.1.90.0000.00817.58
8.1.80.0040.00417.59
8.1.70.0000.00717.59
8.1.60.0000.00817.80
8.1.50.0090.00017.64
8.1.40.0090.00017.71
8.1.30.0050.00217.82
8.1.20.0040.00417.77
8.1.10.0050.00317.60
8.1.00.0080.00417.70
8.0.300.0040.00419.94
8.0.290.0000.00916.74
8.0.280.0040.00418.47
8.0.270.0000.00717.09
8.0.260.0030.00517.17
8.0.250.0030.00317.18
8.0.240.0000.00717.18
8.0.230.0070.00017.07
8.0.220.0000.00717.08
8.0.210.0000.00717.16
8.0.200.0030.00317.07
8.0.190.0050.00217.21
8.0.180.0040.00417.11
8.0.170.0090.00017.02
8.0.160.0050.00317.01
8.0.150.0040.00417.07
8.0.140.0000.00816.96
8.0.130.0000.00513.57
8.0.120.0000.00817.14
8.0.110.0040.00317.08
8.0.100.0000.00717.29
8.0.90.0030.00617.24
8.0.80.0090.01117.14
8.0.70.0040.00417.14
8.0.60.0040.00417.25
8.0.50.0000.00717.15
8.0.30.0100.00717.13
8.0.20.0080.01217.40
8.0.10.0050.00317.22
8.0.00.0120.00616.83
7.4.330.0060.00015.55
7.4.320.0000.00716.79
7.4.300.0000.00616.83
7.4.290.0000.00816.63
7.4.280.0040.00416.92
7.4.270.0030.00316.84
7.4.260.0030.00313.54
7.4.250.0030.00616.63
7.4.240.0040.00416.90
7.4.230.0070.00016.95
7.4.220.0050.00216.89
7.4.210.0110.00616.90
7.4.200.0040.00416.54
7.4.130.0160.00816.77
7.4.120.0180.00316.77
7.4.110.0110.01016.61
7.4.100.0030.01716.70
7.4.90.0120.00616.85
7.4.80.0100.00719.39
7.4.70.0110.00716.79
7.4.60.0090.00916.66
7.4.50.0100.00616.73
7.4.40.0120.00416.88
7.4.30.0130.00716.58
7.4.20.0090.00916.53
7.4.10.0090.00916.68
7.4.00.0090.01316.74
7.3.330.0030.00316.65
7.3.320.0030.00313.58
7.3.310.0070.00016.65
7.3.300.0070.00016.60
7.3.290.0100.01116.54
7.3.260.0120.00616.50
7.3.240.0130.00516.77
7.3.230.0070.01116.86
7.3.210.0150.00416.59
7.3.200.0060.01016.54
7.3.190.0100.00716.84
7.3.180.0110.00416.63
7.3.170.0140.00716.78
7.3.160.0060.00916.66
7.3.150.0150.00916.79
7.3.140.0080.00816.44
7.3.130.0090.01216.55
7.3.120.0110.01116.54
7.3.110.0120.01116.49
7.3.100.0140.01016.54
7.3.90.0180.00516.65
7.3.80.0180.00416.38
7.3.70.0190.00316.38
7.3.60.0090.01216.23
7.3.50.0150.00916.45
7.3.40.0030.01916.56
7.3.30.0180.00616.63
7.3.20.0110.01518.23
7.3.10.0190.00618.32
7.3.00.0060.01316.67
7.2.330.0090.01016.78
7.2.320.0080.01216.83
7.2.310.0140.00316.73
7.2.300.0030.01816.79
7.2.290.0130.00316.74
7.2.280.0120.00616.72
7.2.270.0100.00716.71
7.2.260.0110.01016.93
7.2.250.0150.00616.66
7.2.240.0160.00616.79
7.2.230.0180.00616.57
7.2.220.0100.00916.84
7.2.210.0100.01316.87
7.2.200.0100.01416.50
7.2.190.0120.01216.76
7.2.180.0130.00516.59
7.2.170.0120.00916.64
7.2.160.0030.01616.52
7.2.150.0160.00918.74
7.2.140.0620.01216.71
7.2.130.0070.01116.63
7.2.120.0080.01216.80
7.2.110.0120.00916.63
7.2.100.0070.01116.79
7.2.90.0100.01016.70
7.2.80.0200.00416.75
7.2.70.0110.01616.55
7.2.60.0120.01216.45
7.2.50.0070.01116.80
7.2.40.0110.01116.62
7.2.30.0050.02216.60
7.2.20.0150.01216.60
7.2.10.0060.01916.72
7.2.00.0060.01916.73

preferences:
58.19 ms | 1538 KiB | 5 Q