3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "*After Cesar had reported this, he\r\n jumped into his UFO and flew to space*\r\nStory goes on ... with some text.\r\n*Another section with\r\na linefeed within asterisks*"; echo preg_replace_callback('~\*[^*]*\*~', function($x) { return str_replace(["\r","\n"], '', $x[0]); }, $text);

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.0150.00418.68
8.3.50.0120.00918.23
8.3.40.0040.01121.91
8.3.30.0150.00018.92
8.3.20.0050.00324.18
8.3.10.0070.00024.66
8.3.00.0080.00026.16
8.2.180.0070.00725.92
8.2.170.0150.00419.19
8.2.160.0170.00322.96
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0050.00221.21
8.2.110.0070.00321.05
8.2.100.0120.00017.97
8.2.90.0000.00817.97
8.2.80.0050.00319.29
8.2.70.0060.00317.75
8.2.60.0000.00818.05
8.2.50.0030.00618.05
8.2.40.0050.00218.34
8.2.30.0050.00318.11
8.2.20.0050.00218.20
8.2.10.0000.00719.40
8.2.00.0040.00419.27
8.1.280.0090.00625.92
8.1.270.0080.00024.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.01119.59
8.1.230.0080.00420.96
8.1.220.0040.00417.78
8.1.210.0080.00018.89
8.1.200.0090.00317.48
8.1.190.0080.00017.60
8.1.180.0030.00618.10
8.1.170.0060.00318.76
8.1.160.0070.00018.89
8.1.150.0000.00718.90
8.1.140.0070.00018.84
8.1.130.0040.00420.05
8.1.120.0080.00017.46
8.1.110.0070.00017.53
8.1.100.0070.00017.50
8.1.90.0000.00717.62
8.1.80.0000.00917.66
8.1.70.0000.00717.56
8.1.60.0090.00017.64
8.1.50.0040.00417.62
8.1.40.0000.00917.64
8.1.30.0030.00617.87
8.1.20.0030.00617.84
8.1.10.0030.00717.77
8.1.00.0040.00417.63
8.0.300.0060.00319.90
8.0.290.0040.00416.88
8.0.280.0000.00718.34
8.0.270.0030.00618.16
8.0.260.0030.00318.55
8.0.250.0000.00717.00
8.0.240.0070.00017.00
8.0.230.0000.00716.93
8.0.220.0040.00416.84
8.0.210.0000.00717.00
8.0.200.0030.00317.02
8.0.190.0040.00417.00
8.0.180.0040.00417.11
8.0.170.0030.00616.96
8.0.160.0040.00417.13
8.0.150.0040.00417.04
8.0.140.0040.00717.01
8.0.130.0000.00513.49
8.0.120.0070.00017.07
8.0.110.0000.00716.89
8.0.100.0000.00816.84
8.0.90.0000.00717.03
8.0.80.0060.00917.07
8.0.70.0000.00817.01
8.0.60.0040.00417.11
8.0.50.0030.00517.01
8.0.30.0100.00717.23
8.0.20.0170.00517.42
8.0.10.0090.00017.16
8.0.00.0120.01217.04
7.4.330.0020.00215.55
7.4.320.0000.00616.82
7.4.300.0000.00616.73
7.4.290.0040.00416.69
7.4.280.0040.00416.77
7.4.270.0030.00316.72
7.4.260.0050.00013.46
7.4.250.0030.00516.72
7.4.240.0030.00316.82
7.4.230.0000.00716.65
7.4.220.0000.00716.85
7.4.210.0090.00616.79
7.4.200.0000.00716.93
7.4.130.0090.00916.82
7.4.120.0140.00816.48
7.4.110.0130.00816.61
7.4.100.0140.01116.52
7.4.90.0120.00916.21
7.4.80.0260.00616.63
7.4.70.0220.00716.67
7.4.60.0220.01216.70
7.4.50.0140.00516.29
7.4.40.0180.00716.49
7.4.30.0150.00716.45
7.4.20.0190.00316.27
7.4.10.0140.00716.40
7.4.00.0120.00516.52
7.3.330.0040.00416.53
7.3.320.0050.00013.53
7.3.310.0000.00716.27
7.3.300.0000.00716.37
7.3.290.0090.00716.41
7.3.260.0070.01116.71
7.3.250.0140.00316.42
7.3.240.0170.01116.53
7.3.230.0170.00416.31
7.3.220.0190.00616.70
7.3.210.0250.00716.48
7.3.200.0270.00716.71
7.3.190.0290.01116.45
7.3.180.0230.00916.57
7.3.170.0130.00916.48
7.3.160.0200.00516.36
7.3.150.0270.00016.42
7.3.140.0180.00816.30
7.3.130.0080.01216.77
7.3.120.0160.00416.38
7.3.110.0080.01316.32
7.3.100.0110.00716.39
7.3.90.0080.00816.72
7.3.80.0090.00916.35
7.3.70.0060.01416.53
7.3.60.0130.00316.64
7.3.50.0120.00616.57
7.3.40.0040.01316.51
7.3.30.0120.00316.27
7.3.20.0160.00516.59
7.3.10.0030.01516.56
7.3.00.0080.01016.49

preferences:
72.73 ms | 400 KiB | 5 Q