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); echo '|\[\:' + $lang + '\](.*)\[\:|isuU'; 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.0150.00618.81
8.3.50.0130.01018.43
8.3.40.0030.01719.07
8.3.30.0070.00718.98
8.3.20.0040.00420.29
8.3.10.0040.00420.91
8.3.00.0040.00421.93
8.2.180.0140.00717.00
8.2.170.0140.00722.96
8.2.160.0060.00822.27
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00821.19
8.2.120.0000.00826.35
8.2.110.0030.00622.43
8.2.100.0120.00017.93
8.2.90.0040.00419.36
8.2.80.0050.00317.97
8.2.70.0030.00617.73
8.2.60.0050.00317.80
8.2.50.0060.00318.09
8.2.40.0040.00420.57
8.2.30.0030.00719.42
8.2.20.0050.00217.93
8.2.10.0000.00818.18
8.2.00.0000.00718.34
8.1.280.0100.01025.92
8.1.270.0060.00922.23
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0030.00622.64
8.1.230.0110.00017.83
8.1.220.0000.00817.89
8.1.210.0030.00618.77
8.1.200.0000.00917.73
8.1.190.0050.00319.26
8.1.180.0030.00618.10
8.1.170.0030.00918.78
8.1.160.0050.00220.89
8.1.150.0030.00518.99
8.1.140.0050.00319.70
8.1.130.0000.00717.70
8.1.120.0000.00717.57
8.1.110.0050.00217.69
8.1.100.0040.00417.53
8.1.90.0040.00317.47
8.1.80.0000.00717.61
8.1.70.0030.00317.57
8.1.60.0040.00417.75
8.1.50.0080.00017.70
8.1.40.0050.00317.59
8.1.30.0040.00417.77
8.1.20.0000.00717.68
8.1.10.0000.00817.79
8.1.00.0050.00217.58
8.0.300.0030.00618.77
8.0.290.0020.00517.00
8.0.280.0000.00718.48
8.0.270.0070.00017.30
8.0.260.0000.00717.27
8.0.250.0000.00717.17
8.0.240.0040.00417.29
8.0.230.0050.00217.16
8.0.220.0000.00717.20
8.0.210.0030.00317.32
8.0.200.0000.00617.30
8.0.190.0030.00617.20
8.0.180.0000.00717.08
8.0.170.0000.00717.20
8.0.160.0040.00417.12
8.0.150.0080.00017.25
8.0.140.0070.00017.05
8.0.130.0000.00613.62
8.0.120.0080.00017.25
8.0.110.0000.00717.29
8.0.100.0020.00517.28
8.0.90.0000.00717.12
8.0.80.0090.00617.13
8.0.70.0000.00817.17
8.0.60.0050.00317.37
8.0.50.0000.00817.13
8.0.30.0130.00517.54
8.0.20.0130.00617.41
8.0.10.0040.00417.18
8.0.00.0110.00717.11
7.4.330.0000.00516.79
7.4.320.0000.00716.72
7.4.300.0000.00716.79
7.4.290.0000.00716.88
7.4.280.0000.00716.77
7.4.270.0030.00316.88
7.4.260.0040.00416.80
7.4.250.0080.00016.68
7.4.240.0040.00316.81
7.4.230.0000.00716.98
7.4.220.0090.01616.98
7.4.210.0100.00516.92
7.4.200.0030.00416.78
7.4.160.0130.00816.77
7.4.150.0120.00617.40
7.4.140.0120.00917.86
7.4.130.0070.01016.75
7.4.120.0090.00916.86
7.4.110.0030.01516.73
7.4.100.0130.00416.73
7.4.90.0030.01516.90
7.4.80.0120.00619.39
7.4.70.0080.00816.79
7.4.60.0100.00716.87
7.4.50.0080.00816.97
7.4.40.0140.00316.76
7.4.30.0150.00616.86
7.4.00.0040.01115.22
7.3.330.0000.00613.74
7.3.320.0060.00013.65
7.3.310.0000.00816.69
7.3.300.0030.00316.65
7.3.290.0030.00316.49
7.3.280.0080.00916.54
7.3.270.0070.01017.40
7.3.260.0200.00316.67
7.3.250.0100.00816.68
7.3.240.0150.00516.70
7.3.230.0080.01216.60
7.3.210.0060.01116.86
7.3.200.0080.01216.76
7.3.190.0070.01016.62
7.3.180.0080.00816.65
7.3.170.0060.01016.67
7.3.160.0000.01616.71
7.3.120.0070.01015.18
7.3.110.0040.01215.16
7.3.100.0080.00314.93
7.3.90.0060.00915.07
7.3.80.0130.00315.04
7.3.70.0000.01314.95
7.3.60.0040.01415.04
7.3.50.0060.00614.82
7.3.40.0090.00615.04
7.3.30.0030.00614.76
7.3.20.0080.00817.09
7.3.10.0080.00816.81
7.3.00.0080.00716.86
7.2.330.0130.00816.98
7.2.320.0150.00616.86
7.2.310.0130.00616.89
7.2.300.0070.01016.74
7.2.290.0070.00916.95
7.2.240.0060.01315.13
7.2.230.0030.01415.46
7.2.220.0070.00715.30
7.2.210.0040.01115.17
7.2.200.0070.00315.49
7.2.190.0070.01115.53
7.2.180.0000.01514.99
7.2.170.0100.00315.09
7.2.160.0100.00714.98
7.2.150.0030.01416.98
7.2.140.0030.01217.25
7.2.130.0110.00616.88
7.2.120.0100.01016.96
7.2.110.0090.00716.97
7.2.100.0070.01017.03
7.2.90.0080.00817.09
7.2.80.0140.00217.13
7.2.70.0110.00817.17
7.2.60.0060.00917.08
7.2.50.0070.00917.01
7.2.40.0060.00816.98
7.2.30.0080.01016.90
7.2.20.0080.00717.28
7.2.10.0110.01016.95
7.2.00.0050.01217.97
7.1.330.0060.01216.22
7.1.320.0100.00315.96
7.1.310.0090.00616.04
7.1.300.0060.01215.91
7.1.290.0060.00916.08
7.1.280.0030.00715.95
7.1.270.0030.01216.18
7.1.260.0070.00716.11
7.1.250.0020.01015.95
7.1.200.0080.00015.70
7.1.100.0030.01218.12
7.1.70.0000.01117.54
7.1.60.0030.02119.19
7.1.50.0060.00617.37
7.1.00.0000.07322.37
7.0.200.0400.01014.53
7.0.60.0130.08021.84
7.0.50.0070.07317.90
7.0.40.0070.06720.11
7.0.30.0170.04720.07
7.0.20.0270.04720.09
7.0.10.0170.07320.11
7.0.00.0030.05720.25
5.6.280.0030.04020.90
5.6.210.0170.06720.63
5.6.200.0100.08018.18
5.6.190.0170.08320.48
5.6.180.0300.04020.64
5.6.170.0270.08720.54
5.6.160.0100.08020.47
5.6.150.0030.08718.19
5.6.140.0000.07018.11
5.6.130.0030.04018.25
5.6.120.0030.04320.96
5.6.110.0170.07320.98
5.6.100.0130.07021.01
5.6.90.0030.04321.11
5.6.80.0030.04720.51
5.5.350.0430.07020.42
5.5.340.0130.07717.97
5.5.330.0070.06020.37
5.5.320.0200.04320.35
5.5.310.0300.06020.34
5.5.300.0070.08017.95
5.5.290.0130.07018.02
5.5.280.0030.09020.66
5.5.270.0030.04720.84
5.5.260.0130.04720.64
5.5.250.0100.06720.76
5.5.240.0070.07720.16

preferences:
53.94 ms | 401 KiB | 5 Q