3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '[[Яша|ya.ru]] qwerty [[Яков|yandex.ru]]'; $dict = ['Яша' => 'Яков', 'Яков' => 'Яша']; $res = []; echo preg_replace_callback( '~\[\[(.*?)\|(.*?)]]~', function ($m) use ($dict, &$res) { array_push($res, $m[1]); return '<a href="'. mb_strtoupper($m[2]) . '" target="_blank">'. (isset($dict[$m[1]]) ? $dict[$m[1]] : $m[1]) . '</a>'; }, $str ) . "\n"; print_r($res);

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.0160.00318.43
8.3.50.0090.00618.40
8.3.40.0070.01018.96
8.3.30.0070.00719.01
8.3.20.0040.00421.85
8.3.10.0040.00421.91
8.3.00.0050.00319.78
8.2.180.0090.00925.92
8.2.170.0140.00719.21
8.2.160.0120.00322.96
8.2.150.0050.00225.66
8.2.140.0000.00824.66
8.2.130.0000.00819.27
8.2.120.0080.00026.16
8.2.110.0040.01421.23
8.2.100.0080.00417.97
8.2.90.0030.00518.22
8.2.80.0000.01020.26
8.2.70.0050.00317.88
8.2.60.0000.00817.75
8.2.50.0030.00617.87
8.2.40.0030.00619.70
8.2.30.0040.00419.42
8.2.20.0050.00318.13
8.2.10.0040.00418.20
8.2.00.0050.00218.04
8.1.280.0070.00725.92
8.1.270.0000.00724.66
8.1.260.0040.00426.35
8.1.250.0040.00728.09
8.1.240.0060.00322.19
8.1.230.0030.00820.98
8.1.220.0040.00417.74
8.1.210.0040.00418.98
8.1.200.0050.00317.60
8.1.190.0040.00417.47
8.1.180.0050.00318.10
8.1.170.0030.00519.03
8.1.160.0060.00319.04
8.1.150.0050.00219.05
8.1.140.0000.00717.71
8.1.130.0030.00319.10
8.1.120.0000.00717.70
8.1.110.0070.00017.60
8.1.100.0000.00817.64
8.1.90.0000.00717.70
8.1.80.0000.00717.68
8.1.70.0000.00817.68
8.1.60.0030.00517.77
8.1.50.0040.00417.75
8.1.40.0080.00017.67
8.1.30.0090.00017.80
8.1.20.0000.00817.79
8.1.10.0030.00617.78
8.1.00.0040.00417.80
8.0.300.0000.00720.16
8.0.290.0080.00016.88
8.0.280.0030.00318.52
8.0.270.0030.00317.35
8.0.260.0070.00019.04
8.0.250.0030.00317.07
8.0.240.0030.00717.16
8.0.230.0000.00717.17
8.0.220.0030.00317.14
8.0.210.0050.00317.07
8.0.200.0040.00417.13
8.0.190.0030.00517.13
8.0.180.0000.00817.14
8.0.170.0040.00717.12
8.0.160.0060.00317.18
8.0.150.0000.00717.11
8.0.140.0040.00417.04
8.0.130.0000.00613.50
8.0.120.0040.00416.98
8.0.110.0000.00816.93
8.0.100.0040.00417.13
8.0.90.0000.00717.08
8.0.80.0060.01017.02
8.0.70.0000.00717.00
8.0.60.0040.00417.00
8.0.50.0000.00817.15
8.0.30.0110.00817.29
8.0.20.0140.00417.41
8.0.10.0050.00216.99
8.0.00.0070.01116.86
7.4.330.0000.00515.55
7.4.320.0000.00616.79
7.4.300.0000.00716.71
7.4.290.0030.00316.86
7.4.280.0030.00516.88
7.4.270.0040.00716.73
7.4.260.0070.00016.91
7.4.250.0070.00016.87
7.4.240.0030.00316.78
7.4.230.0040.00416.77
7.4.220.0070.00016.89
7.4.210.0040.01216.82
7.4.200.0000.00716.98
7.4.160.0070.00916.55
7.4.140.0140.00817.86
7.4.130.0130.00616.54
7.4.120.0080.01216.77
7.4.110.0100.01316.58
7.4.100.0080.00816.68
7.4.90.0060.01416.64
7.4.80.0140.01019.39
7.4.70.0070.01416.84
7.4.60.0030.01416.68
7.4.50.0060.01316.64
7.4.40.0060.01316.84
7.4.00.0060.00914.95
7.3.330.0030.00313.57
7.3.320.0050.00013.40
7.3.310.0000.00716.63
7.3.300.0030.00316.54
7.3.290.0030.00316.51
7.3.280.0110.00316.53
7.3.260.0100.00916.70
7.3.240.0050.01216.61
7.3.230.0100.00716.66
7.3.210.0030.01316.47
7.3.200.0120.00916.44
7.3.190.0070.01116.85
7.3.180.0040.01216.63
7.3.170.0090.00916.81
7.3.160.0060.01216.80
7.2.330.0120.00616.78
7.2.320.0070.01016.87
7.2.310.0130.00316.92
7.2.300.0090.00916.82
7.2.290.0130.00516.84
7.2.80.0060.00616.73
7.2.60.0000.01216.90
7.2.40.0480.01218.32
7.2.30.1510.01018.50
7.2.20.0710.01418.40
7.2.10.0420.01517.93
7.2.00.0470.01118.34
7.1.200.0050.00515.95
7.1.160.0450.00917.00
7.1.150.0410.01316.84
7.1.140.0610.01117.29
7.1.130.0460.01317.31
7.1.120.0550.01316.77
7.1.110.0500.00716.26
7.1.100.0490.00816.54
7.1.90.0630.01116.32
7.1.80.0580.00916.73
7.1.70.0540.00715.56
7.1.60.0980.01333.41
7.1.50.0600.01633.13
7.1.40.0710.01332.68
7.1.30.0670.01232.86
7.1.20.0630.01533.02
7.1.10.0450.01115.10
7.1.00.1070.01215.15

preferences:
33.62 ms | 400 KiB | 5 Q