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.0100.01018.55
8.3.50.0080.00818.30
8.3.40.0120.00319.02
8.3.30.0070.00718.93
8.3.20.0070.00020.25
8.3.10.0050.00320.91
8.3.00.0050.00221.67
8.2.180.0110.01117.00
8.2.170.0040.01122.96
8.2.160.0000.01422.38
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00421.30
8.2.120.0040.00426.35
8.2.110.0030.00622.37
8.2.100.0060.00618.05
8.2.90.0030.00619.21
8.2.80.0030.00518.00
8.2.70.0040.00417.75
8.2.60.0040.00417.93
8.2.50.0000.00818.09
8.2.40.0030.00520.51
8.2.30.0080.00319.58
8.2.20.0030.00618.11
8.2.10.0040.00418.26
8.2.00.0000.00818.25
8.1.280.0060.00925.92
8.1.270.0090.00622.13
8.1.260.0000.00828.09
8.1.250.0020.00528.09
8.1.240.0090.00022.66
8.1.230.0090.00317.89
8.1.220.0090.00017.79
8.1.210.0040.00418.77
8.1.200.0060.00317.50
8.1.190.0000.00817.38
8.1.180.0050.00318.10
8.1.170.0030.00718.71
8.1.160.0020.00520.92
8.1.150.0060.00320.68
8.1.140.0040.00419.56
8.1.130.0050.00217.78
8.1.120.0030.00517.63
8.1.110.0030.00617.63
8.1.100.0090.00017.64
8.1.90.0040.00417.55
8.1.80.0040.00417.58
8.1.70.0030.00317.52
8.1.60.0040.00417.75
8.1.50.0030.00517.74
8.1.40.0030.00517.71
8.1.30.0030.00517.83
8.1.20.0080.00017.69
8.1.10.0080.00017.68
8.1.00.0000.00917.57
8.0.300.0060.00318.77
8.0.290.0080.00017.00
8.0.280.0000.00718.50
8.0.270.0060.00317.36
8.0.260.0030.00317.22
8.0.250.0080.00017.25
8.0.240.0000.00817.29
8.0.230.0000.00817.26
8.0.220.0040.00417.18
8.0.210.0030.00317.20
8.0.200.0030.00317.31
8.0.190.0000.00717.07
8.0.180.0000.00717.20
8.0.170.0040.00417.21
8.0.160.0000.00817.03
8.0.150.0030.00317.11
8.0.140.0040.00417.14
8.0.130.0030.00313.59
8.0.120.0000.00817.26
8.0.110.0080.00017.20
8.0.100.0070.00017.13
8.0.90.0000.00717.20
8.0.80.0060.01017.27
8.0.70.0000.00717.22
8.0.60.0070.00017.14
8.0.50.0030.00517.14
8.0.30.0070.01117.34
8.0.20.0030.01717.40
8.0.10.0080.00017.38
8.0.00.0050.01417.08
7.4.330.0000.00516.76
7.4.320.0000.00716.77
7.4.300.0030.00316.70
7.4.290.0070.00016.81
7.4.280.0070.00016.72
7.4.270.0030.00316.86
7.4.260.0000.00816.70
7.4.250.0040.00416.65
7.4.240.0030.00316.88
7.4.230.0070.00016.63
7.4.220.0090.00916.84
7.4.210.0080.00616.78
7.4.200.0000.00816.76
7.4.160.0030.01416.70
7.4.150.0040.01517.40
7.4.140.0130.00617.86
7.4.130.0050.01216.86
7.4.120.0100.00716.81
7.4.110.0110.01116.93
7.4.100.0090.01216.93
7.4.90.0120.00616.67
7.4.80.0130.01019.39
7.4.70.0180.00316.85
7.4.60.0120.00916.80
7.4.50.0080.00316.82
7.4.40.0080.01616.76
7.4.30.0100.00716.91
7.4.00.0120.00315.18
7.3.330.0000.00613.64
7.3.320.0050.00013.63
7.3.310.0000.00716.54
7.3.300.0030.00316.70
7.3.290.0050.00216.59
7.3.280.0090.00816.57
7.3.270.0110.00717.40
7.3.260.0100.00716.64
7.3.250.0120.00716.57
7.3.240.0100.01116.74
7.3.230.0110.01116.79
7.3.210.0040.01416.63
7.3.200.0040.01216.72
7.3.190.0120.00316.66
7.3.180.0140.00316.75
7.3.170.0150.00416.52
7.3.160.0060.01316.89
7.2.330.0150.00316.85
7.2.320.0180.00016.91
7.2.310.0130.00316.85
7.2.300.0070.01016.81
7.2.290.0100.01316.93
7.2.60.0340.00316.99
7.2.00.0060.00619.82
7.1.200.0070.00415.90
7.1.100.0100.00618.44
7.1.70.0040.00717.21
7.1.60.0160.00619.19
7.1.50.0060.01517.28
7.1.00.0030.07722.42
7.0.200.0570.00714.58
7.0.60.0130.08021.84
7.0.50.0030.06017.98
7.0.40.0100.08320.32
7.0.30.0470.06020.23
7.0.20.0300.08020.25
7.0.10.0030.08720.09
7.0.00.0100.09020.13
5.6.280.0070.02721.10
5.6.210.0030.08720.50
5.6.200.0070.06318.29
5.6.190.0000.05020.61
5.6.180.0300.07320.52
5.6.170.0370.06020.57
5.6.160.0130.04720.57
5.6.150.0100.04318.19
5.6.140.0030.07318.17
5.6.130.0000.04318.17
5.6.120.0030.04020.99
5.6.110.0030.07721.08
5.6.100.0030.06721.04
5.6.90.0070.07320.99
5.6.80.0070.08020.46
5.5.350.0400.06720.35
5.5.340.0070.04318.04
5.5.330.0070.04020.40
5.5.320.0270.05020.20
5.5.310.0330.04020.30
5.5.300.0070.05718.09
5.5.290.0100.04317.96
5.5.280.0070.07020.87
5.5.270.0100.08320.88
5.5.260.0030.07320.73
5.5.250.0030.08320.61
5.5.240.0000.06320.27

preferences:
55.72 ms | 400 KiB | 5 Q