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.0070.01418.55
8.3.50.0100.01022.11
8.3.40.0110.00419.26
8.3.30.0070.00719.07
8.3.20.0070.00020.39
8.3.10.0080.00020.77
8.3.00.0040.00421.77
8.2.180.0120.00917.25
8.2.170.0070.00722.96
8.2.160.0100.00322.21
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00021.02
8.2.120.0000.00826.35
8.2.110.0100.00022.32
8.2.100.0080.00417.93
8.2.90.0030.00519.22
8.2.80.0040.00418.00
8.2.70.0040.00417.63
8.2.60.0050.00318.04
8.2.50.0050.00518.09
8.2.40.0040.00420.54
8.2.30.0030.00619.63
8.2.20.0080.00018.09
8.2.10.0040.00418.22
8.2.00.0000.00818.33
8.1.280.0000.01525.92
8.1.270.0030.01122.05
8.1.260.0080.00028.09
8.1.250.0030.00528.09
8.1.240.0060.00323.82
8.1.230.0040.00717.77
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.60
8.1.190.0040.00419.14
8.1.180.0030.00518.10
8.1.170.0030.00718.63
8.1.160.0000.00720.96
8.1.150.0000.00820.66
8.1.140.0080.00019.73
8.1.130.0000.00717.73
8.1.120.0000.00717.58
8.1.110.0000.00717.45
8.1.100.0000.00917.62
8.1.90.0040.00417.64
8.1.80.0040.00417.54
8.1.70.0000.00717.53
8.1.60.0030.00517.64
8.1.50.0050.00317.75
8.1.40.0050.00317.60
8.1.30.0040.00417.85
8.1.20.0030.00617.57
8.1.10.0080.00017.76
8.1.00.0050.00317.61
8.0.300.0040.00418.77
8.0.290.0060.00316.97
8.0.280.0000.00718.62
8.0.270.0000.00817.29
8.0.260.0040.00417.33
8.0.250.0040.00317.29
8.0.240.0040.00417.32
8.0.230.0000.00717.14
8.0.220.0070.00017.22
8.0.210.0030.00317.16
8.0.200.0030.00317.18
8.0.190.0070.00017.17
8.0.180.0000.00717.23
8.0.170.0040.00417.21
8.0.160.0000.00717.17
8.0.150.0000.00717.15
8.0.140.0000.00717.00
8.0.130.0030.00313.70
8.0.120.0070.00017.27
8.0.110.0050.00317.25
8.0.100.0040.00417.14
8.0.90.0040.00417.28
8.0.80.0070.01017.23
8.0.70.0000.00717.22
8.0.60.0040.00417.23
8.0.50.0060.00317.19
8.0.30.0110.00717.38
8.0.20.0060.01317.46
8.0.10.0050.00317.18
8.0.00.0130.00717.01
7.4.330.0020.00216.91
7.4.320.0000.00616.79
7.4.300.0000.00716.75
7.4.290.0000.00816.81
7.4.280.0040.00416.82
7.4.270.0000.00716.76
7.4.260.0040.00416.87
7.4.250.0040.00416.80
7.4.240.0070.00016.79
7.4.230.0070.00016.65
7.4.220.0070.01116.71
7.4.210.0120.00416.80
7.4.200.0040.00416.91
7.4.160.0070.01016.82
7.4.150.0110.00717.40
7.4.140.0110.01117.86
7.4.130.0130.00616.65
7.4.120.0130.00516.81
7.4.110.0100.00716.56
7.4.100.0160.00816.77
7.4.90.0090.00916.70
7.4.80.0120.00619.39
7.4.70.0090.01216.86
7.4.60.0040.01216.88
7.4.50.0030.01216.81
7.4.40.0100.01316.83
7.4.30.0100.00716.75
7.4.00.0050.01215.24
7.3.330.0030.00313.64
7.3.320.0030.00313.47
7.3.310.0000.00716.54
7.3.300.0040.00416.50
7.3.290.0000.00716.52
7.3.280.0110.00616.58
7.3.270.0030.01317.40
7.3.260.0100.00716.64
7.3.250.0120.00616.70
7.3.240.0090.00916.76
7.3.230.0160.00516.63
7.3.210.0120.00916.62
7.3.200.0120.00416.63
7.3.190.0060.00916.60
7.3.180.0090.00916.91
7.3.170.0120.00416.61
7.3.160.0090.00616.67
7.3.120.0130.00614.96
7.3.110.0100.00715.11
7.3.100.0030.00714.95
7.3.90.0080.00315.09
7.3.80.0100.00315.18
7.3.70.0060.00614.85
7.3.60.0100.00315.02
7.3.50.0070.00714.74
7.3.40.0030.01415.02
7.3.30.0080.00815.09
7.3.20.0110.00417.10
7.3.10.0070.00716.90
7.3.00.0030.01117.08
7.2.330.0190.00016.80
7.2.320.0150.00916.99
7.2.310.0070.01116.78
7.2.300.0070.01116.77
7.2.290.0140.00616.81
7.2.250.0030.01615.19
7.2.240.0060.01315.21
7.2.230.0100.00715.38
7.2.220.0030.00915.20
7.2.210.0140.00015.35
7.2.200.0130.00315.39
7.2.190.0030.01014.98
7.2.180.0030.01415.02
7.2.170.0100.00315.36
7.2.80.0060.00616.88
7.2.60.0100.00317.10
7.2.00.0090.00319.38
7.1.330.0090.00615.55
7.1.320.0070.00715.91
7.1.310.0070.00316.01
7.1.300.0070.01015.93
7.1.290.0060.01016.03
7.1.280.0030.00715.79
7.1.270.0060.00916.15
7.1.260.0070.00715.95
7.1.200.0060.00615.98
7.1.100.0090.00418.29
7.1.70.0070.00017.30
7.1.60.0100.01619.19
7.1.50.0040.01817.38
7.1.00.0030.07322.31
7.0.200.0520.00314.79
7.0.60.0130.07021.84
7.0.50.0070.08017.86
7.0.40.0030.05020.18
7.0.30.0330.05020.14
7.0.20.0430.06720.33
7.0.10.0030.05020.11
7.0.00.0070.06720.13
5.6.280.0000.03320.86
5.6.210.0070.07720.53
5.6.200.0030.08318.20
5.6.190.0100.08020.52
5.6.180.0330.04320.62
5.6.170.0300.06720.54
5.6.160.0000.06320.54
5.6.150.0070.08318.22
5.6.140.0070.07718.11
5.6.130.0000.04318.18
5.6.120.0070.03721.12
5.6.110.0070.07020.97
5.6.100.0030.08021.07
5.6.90.0070.07720.97
5.6.80.0200.06320.39
5.5.350.0300.07720.28
5.5.340.0030.04317.93
5.5.330.0030.06020.27
5.5.320.0600.06320.25
5.5.310.0230.05320.50
5.5.300.0030.05718.04
5.5.290.0100.08318.05
5.5.280.0070.08320.84
5.5.270.0000.05320.88
5.5.260.0200.07320.84
5.5.250.0030.06320.58
5.5.240.0070.07720.17

preferences:
40.6 ms | 401 KiB | 5 Q