3v4l.org

run code in 300+ PHP versions simultaneously
<?php $id = '23423'; $s = '|'; $text = 'content to insert'; $data_update = "Some text 23423 in between end\nsome text"; $data_update = preg_replace('/\b(' . $id . '\b.*)(\R)/', '$1 ' . $text . '$2', $data_update, 1); echo $data_update;

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.10.0100.00817.01
8.5.00.0100.01120.32
8.4.150.0020.00014.05
8.4.140.0140.00819.48
8.4.130.0100.00917.77
8.4.120.0060.00320.52
8.4.110.0120.00422.36
8.4.100.0140.00718.04
8.4.90.0100.00820.53
8.4.80.0130.00719.08
8.4.70.0130.00718.95
8.4.60.0060.00220.50
8.4.50.0100.01118.68
8.4.40.0060.01317.92
8.4.30.0060.01318.39
8.4.20.0150.00418.17
8.4.10.0030.00620.84
8.3.280.0120.00818.62
8.3.270.0130.00616.46
8.3.260.0040.00416.55
8.3.250.0030.00518.97
8.3.240.0030.00616.98
8.3.230.0110.01016.77
8.3.220.0050.00318.95
8.3.210.0110.00816.76
8.3.200.0040.00516.68
8.3.190.0100.00717.20
8.3.180.0090.00918.95
8.3.170.0090.00917.29
8.3.160.0140.00017.11
8.3.150.0090.00918.93
8.3.140.0070.01016.89
8.3.130.0030.00618.43
8.3.120.0000.00819.00
8.3.110.0050.00520.94
8.3.100.0000.00824.06
8.3.90.0050.00326.77
8.3.80.0030.00616.50
8.3.70.0100.01018.56
8.3.60.0150.00616.88
8.3.50.0110.00924.59
8.3.40.0120.00618.84
8.3.30.0090.00519.29
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0040.00518.73
8.2.280.0120.00718.39
8.2.270.0160.00318.41
8.2.260.0080.00016.87
8.2.250.0030.00716.59
8.2.240.0080.01118.85
8.2.230.0080.00022.58
8.2.220.0040.00437.54
8.2.210.0120.00626.77
8.2.200.0060.00316.88
8.2.190.0100.00718.66
8.2.180.0040.01125.92
8.2.170.0070.00722.96
8.2.160.0080.00622.96
8.2.150.0050.00325.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.79
8.2.110.0100.00021.20
8.2.100.0040.00817.91
8.2.90.0040.00419.46
8.2.80.0000.00818.84
8.2.70.0000.00817.75
8.2.60.0030.00617.93
8.2.50.0040.00419.73
8.2.40.0040.00418.09
8.2.30.0070.00018.15
8.2.20.0000.00717.96
8.2.10.0040.00419.24
8.2.00.0070.00019.21
8.1.330.0140.00422.01
8.1.320.0110.00718.18
8.1.310.0040.00416.93
8.1.300.0000.00916.21
8.1.290.0060.00318.88
8.1.280.0070.00725.92
8.1.270.0000.00822.14
8.1.260.0000.00926.35
8.1.250.0050.00328.09
8.1.240.0030.00619.42
8.1.230.0040.00822.21
8.1.220.0060.00317.91
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0000.00817.35
8.1.180.0110.00018.10
8.1.170.0030.00618.69
8.1.160.0090.00018.91
8.1.150.0020.00518.85
8.1.140.0040.00418.97
8.1.130.0000.00720.07
8.1.120.0060.00317.61
8.1.110.0070.00317.62
8.1.100.0050.00317.52
8.1.90.0030.00517.57
8.1.80.0080.00017.66
8.1.70.0030.00317.62
8.1.60.0030.00517.74
8.1.50.0050.00317.69
8.1.40.0030.00617.59
8.1.30.0040.00417.85
8.1.20.0040.00417.70
8.1.10.0040.00417.63
8.1.00.0000.00817.58
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0070.00018.54
8.0.270.0070.00018.20
8.0.260.0000.00720.26
8.0.250.0000.00616.97
8.0.240.0030.00317.04
8.0.230.0000.00717.11
8.0.220.0000.00716.92
8.0.210.0030.00317.04
8.0.200.0070.00016.99
8.0.190.0040.00417.05
8.0.180.0040.00417.12
8.0.170.0040.00417.04
8.0.160.0030.00517.05
8.0.150.0000.00717.00
8.0.140.0080.00017.01
8.0.130.0030.00313.51
8.0.120.0080.00016.91
8.0.110.0000.00716.89
8.0.100.0040.00416.81
8.0.90.0060.00317.03
8.0.80.0080.00716.95
8.0.70.0050.00216.91
8.0.60.0000.00716.89
8.0.50.0030.00316.83
8.0.30.0060.01117.21
8.0.20.0120.01217.07
8.0.10.0070.00016.89
8.0.00.0100.00916.92
7.4.330.0060.00015.55
7.4.320.0000.00616.75
7.4.300.0000.00616.77
7.4.290.0050.00216.72
7.4.280.0050.00216.66
7.4.270.0000.00716.72
7.4.260.0000.00813.48
7.4.250.0000.00716.64
7.4.240.0030.00316.78
7.4.230.0000.00816.78
7.4.220.0030.00316.71
7.4.210.0100.00816.79
7.4.200.0000.00716.63
7.4.130.0030.01416.67
7.4.120.0140.01116.79
7.4.110.0070.01016.56
7.4.100.0070.01016.48
7.4.90.0150.00316.70
7.4.80.0000.02319.39
7.4.70.0030.01316.61
7.4.60.0060.01016.51
7.4.50.0140.00316.60
7.4.40.0080.01216.29
7.4.30.0180.00316.41
7.4.20.0110.00816.50
7.4.10.0040.01316.32
7.4.00.0060.01216.42
7.3.330.0040.00416.22
7.3.320.0000.00613.28
7.3.310.0000.00716.35
7.3.300.0000.00716.32
7.3.290.0060.00816.42
7.3.260.0060.01316.63
7.3.240.0100.00916.63
7.3.230.0030.01316.43
7.3.210.0150.00316.38
7.3.200.0060.00916.49
7.3.190.0130.00316.48
7.3.180.0090.00616.47
7.3.170.0150.00316.39
7.3.160.0120.00616.32
7.3.150.0110.00816.30
7.3.140.0040.01616.70
7.3.130.0080.01216.68
7.3.120.0090.00916.39
7.3.110.0070.01116.34
7.3.100.0060.01216.32
7.3.90.0060.01316.59
7.3.80.0130.00616.63
7.3.70.0040.01416.41
7.3.60.0080.01216.38
7.3.50.0110.01116.28
7.3.40.0110.00616.43
7.3.30.0130.00616.42
7.3.20.0070.01116.54
7.3.10.0120.00816.39
7.3.00.0100.00716.29
7.2.330.0060.01716.76
7.2.320.0100.00716.61
7.2.310.0140.01116.81
7.2.300.0090.00816.70
7.2.290.0140.01216.40
7.2.280.0060.01316.77
7.2.270.0090.01216.76
7.2.260.0070.01116.95
7.2.250.0030.01316.61
7.2.240.0090.00916.75
7.2.230.0120.00816.69
7.2.220.0140.00716.50
7.2.210.0150.00316.71
7.2.200.0060.01316.61
7.2.190.0110.00716.70
7.2.180.0100.00716.85
7.2.170.0170.00316.45
7.2.160.0110.00816.57
7.2.150.0160.00316.81
7.2.140.0460.00916.71
7.2.130.0130.00616.75
7.2.120.0150.00316.66
7.2.110.0160.00316.66
7.2.100.0110.01116.75
7.2.90.0100.01016.65
7.2.80.0090.01216.86
7.2.70.0130.01016.69
7.2.60.0060.01516.75
7.2.50.0040.01816.90
7.2.40.0120.00916.94
7.2.30.0070.01416.65
7.2.20.0120.00616.76
7.2.10.0090.01516.68
7.2.00.0120.01216.79

preferences:
173.24 ms | 403 KiB | 5 Q