3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "<div> <img src='/logo.png'>[:ru]Привет мир[:en]Hello World[:] </div>"; $lang = 'ru'; echo preg_replace_callback('|\[:.*\[:\]|isuU', function ($find) use ($lang) { //print_r($matches); if (preg_match('|\[\:' + $lang + '\](.*)\[\:|isuU', $find[0], $matches)) { return $matches[1]; } }, $html);

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.01118.93
8.3.50.0150.00722.23
8.3.40.0150.00619.01
8.3.30.0080.00618.73
8.3.20.0070.00020.25
8.3.10.0040.00420.94
8.3.00.0040.00421.91
8.2.180.0040.01816.63
8.2.170.0040.01122.96
8.2.160.0100.00322.25
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00021.01
8.2.120.0070.00026.35
8.2.110.0060.00320.53
8.2.100.0110.00018.09
8.2.90.0050.00319.17
8.2.80.0040.00417.97
8.2.70.0050.00317.88
8.2.60.0050.00317.80
8.2.50.0060.00318.09
8.2.40.0040.00420.54
8.2.30.0070.00419.44
8.2.20.0070.00018.12
8.2.10.0000.00718.14
8.2.00.0050.00318.10
8.1.280.0140.00725.92
8.1.270.0080.01122.11
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.01022.08
8.1.230.0040.00719.00
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0050.00517.60
8.1.190.0050.00317.36
8.1.180.0000.00818.10
8.1.170.0030.00618.49
8.1.160.0000.00720.88
8.1.150.0000.00718.92
8.1.140.0080.00019.60
8.1.130.0040.00417.78
8.1.120.0000.00717.61
8.1.110.0040.00417.54
8.1.100.0000.00817.54
8.1.90.0070.00017.59
8.1.80.0040.00417.65
8.1.70.0040.00417.55
8.1.60.0050.00217.68
8.1.50.0040.00417.66
8.1.40.0050.00317.71
8.1.30.0040.00417.73
8.1.20.0000.00817.64
8.1.10.0000.00817.66
8.1.00.0080.00017.70
8.0.300.0080.00018.77
8.0.290.0000.00817.00
8.0.280.0000.00718.48
8.0.270.0000.00717.36
8.0.260.0040.00417.16
8.0.250.0070.00017.27
8.0.240.0000.00717.14
8.0.230.0040.00417.13
8.0.220.0040.00317.21
8.0.210.0070.00017.25
8.0.200.0030.00317.23
8.0.190.0050.00317.29
8.0.180.0070.00017.22
8.0.170.0000.00817.19
8.0.160.0050.00317.07
8.0.150.0030.00317.23
8.0.140.0050.00217.16
8.0.130.0030.00313.61
8.0.120.0080.00017.05
8.0.110.0000.00817.17
8.0.100.0000.00717.15
8.0.90.0000.00817.09
8.0.80.0070.01417.30
8.0.70.0000.00817.22
8.0.60.0040.00417.31
8.0.50.0050.00217.05
8.0.30.0120.00517.27
8.0.20.0130.01017.46
8.0.10.0030.00517.29
8.0.00.0050.01217.03
7.4.330.0030.00316.79
7.4.320.0000.00616.80
7.4.300.0030.00316.90
7.4.290.0030.00316.88
7.4.280.0070.00016.68
7.4.270.0030.00316.86
7.4.260.0050.00316.72
7.4.250.0070.00016.86
7.4.240.0000.00716.87
7.4.230.0030.00316.96
7.4.220.0130.01316.91
7.4.210.0130.00416.89
7.4.200.0000.00716.91
7.4.160.0110.00616.90
7.4.150.0100.00717.40
7.4.140.0070.01117.86
7.4.130.0060.01116.72
7.4.120.0120.00916.87
7.4.110.0070.01116.75
7.4.100.0060.01116.65
7.4.90.0100.00616.72
7.4.80.0030.01419.39
7.4.70.0080.00816.71
7.4.60.0090.00916.84
7.4.50.0090.00616.80
7.4.40.0070.01016.74
7.4.30.0130.01016.70
7.4.00.0070.01015.17
7.3.330.0030.00313.61
7.3.320.0000.00513.45
7.3.310.0050.00316.56
7.3.300.0030.00316.48
7.3.290.0070.00016.58
7.3.280.0100.00716.57
7.3.270.0080.00917.40
7.3.260.0130.01016.88
7.3.250.0110.00916.58
7.3.240.0080.01316.70
7.3.230.0060.01916.73
7.3.210.0140.00316.63
7.3.200.0070.01016.77
7.3.190.0130.00316.73
7.3.180.0100.00716.82
7.3.170.0090.00916.76
7.3.160.0100.00716.55
7.2.330.0110.01416.88
7.2.320.0130.01016.75
7.2.310.0070.01016.80
7.2.300.0120.00616.96
7.2.290.0050.01416.63
7.2.80.0040.00416.69
7.2.60.0060.00317.10
7.2.00.0040.00819.34
7.1.200.0220.00615.69
7.1.100.0070.00718.65
7.1.70.0030.00817.54
7.1.60.0030.02019.19
7.1.50.0090.01317.22
7.1.00.0000.07722.47
7.0.200.0510.00714.73
7.0.60.0100.08321.73
7.0.50.0200.07317.89
7.0.40.0070.05320.05
7.0.30.0300.09020.22
7.0.20.0300.05020.24
7.0.10.0070.04320.18
7.0.00.0070.05020.25
5.6.280.0100.02720.91
5.6.210.0130.06320.55
5.6.200.0030.06718.13
5.6.190.0070.04320.69
5.6.180.0300.07320.33
5.6.170.0330.07320.55
5.6.160.0170.07320.54
5.6.150.0170.04318.19
5.6.140.0130.07718.14
5.6.130.0070.03718.15
5.6.120.0030.04021.02
5.6.110.0030.08721.05
5.6.100.0100.07020.98
5.6.90.0130.03321.10
5.6.80.0200.06320.39
5.5.350.0230.07720.47
5.5.340.0030.04017.92
5.5.330.0070.08020.21
5.5.320.0570.05720.32
5.5.310.0270.05320.27
5.5.300.0070.03717.97
5.5.290.0030.05317.95
5.5.280.0100.08320.69
5.5.270.0000.04720.97
5.5.260.0100.05320.80
5.5.250.0070.04320.61
5.5.240.0000.07720.37

preferences:
45.7 ms | 401 KiB | 5 Q