3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_link($link) { if(preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $link, $r)) { $pattern = '#<a\s?href="(https?:\/\/(?:www.)?[\w.\#\/?=]+)">\1<\/a>#is'; return preg_replace($pattern,'<iframe width="560" height="315" src="https://www.youtube.com/embed/'.$r[0].'" frameborder="0"></iframe>',$link); } } echo check_link('<a href="https://www.youtube.com/watch?v=Z7Oc8QaM5VU">https://www.youtube.com/watch?v=Z7Oc8QaM5VU</a>');

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.5.10.0050.00618.71
8.5.00.0130.00920.25
8.4.150.0020.00014.05
8.4.140.0230.01217.60
8.4.130.0040.00518.05
8.4.120.0110.00620.51
8.4.110.0120.00918.86
8.4.100.0100.00918.03
8.4.90.0040.00820.69
8.4.80.0100.01018.84
8.4.70.0040.00418.85
8.4.60.0020.00620.45
8.4.50.0130.00620.48
8.4.40.0100.00718.12
8.4.30.0130.00719.45
8.4.20.0070.01019.91
8.4.10.0040.00717.61
8.3.280.0110.00918.63
8.3.270.0120.00616.86
8.3.260.0090.00916.85
8.3.250.0060.00219.05
8.3.240.0120.00716.89
8.3.230.0150.00516.64
8.3.220.0060.00218.76
8.3.210.0130.00716.74
8.3.200.0040.00616.50
8.3.190.0050.00317.18
8.3.180.0070.00516.42
8.3.170.0070.01117.22
8.3.160.0120.00316.73
8.3.150.0070.01120.92
8.3.140.0080.00817.29
8.3.130.0000.00918.56
8.3.120.0090.00020.91
8.3.110.0060.00920.94
8.3.100.0060.00324.06
8.3.90.0090.00626.77
8.3.80.0090.00019.36
8.3.70.0120.00316.88
8.3.60.0120.00618.43
8.3.50.0100.00518.39
8.3.40.0090.00618.96
8.3.30.0070.00718.76
8.3.20.0080.00021.89
8.3.10.0040.00421.86
8.3.00.0040.00423.64
8.2.290.0070.00217.09
8.2.280.0130.00620.48
8.2.270.0160.00417.01
8.2.260.0040.01116.69
8.2.250.0080.00018.82
8.2.240.0040.00717.21
8.2.230.0060.00322.58
8.2.220.0160.00337.54
8.2.210.0150.00026.77
8.2.200.0060.00618.88
8.2.190.0040.01116.70
8.2.180.0110.00718.66
8.2.170.0180.00022.96
8.2.160.0140.00020.39
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00420.86
8.2.110.0000.01121.11
8.2.100.0090.00318.03
8.2.90.0040.00419.11
8.2.80.0060.00317.97
8.2.70.0030.00617.88
8.2.60.0030.00618.03
8.2.50.0040.00418.07
8.2.40.0000.00818.23
8.2.30.0040.00418.13
8.2.20.0000.00718.23
8.2.10.0090.00018.09
8.2.00.0000.00719.29
8.1.330.0070.00316.59
8.1.320.0120.00818.22
8.1.310.0030.00718.41
8.1.300.0050.00316.31
8.1.290.0030.00630.84
8.1.280.0120.00425.92
8.1.270.0000.00923.87
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0110.00022.66
8.1.230.0090.00319.55
8.1.220.0050.00317.79
8.1.210.0050.00318.77
8.1.200.0060.00317.47
8.1.190.0040.00417.35
8.1.180.0000.00819.19
8.1.170.0050.00318.76
8.1.160.0080.00018.94
8.1.150.0040.00420.75
8.1.140.0070.00017.73
8.1.130.0050.00319.00
8.1.120.0000.00717.63
8.1.110.0000.00817.46
8.1.100.0070.00017.61
8.1.90.0040.00417.52
8.1.80.0000.00717.59
8.1.70.0000.00817.52
8.1.60.0030.00617.70
8.1.50.0040.00417.67
8.1.40.0050.00517.68
8.1.30.0000.00817.81
8.1.20.0020.00517.77
8.1.10.0040.00417.61
8.1.00.0000.00817.70
8.0.300.0000.00818.77
8.0.290.0070.00017.00
8.0.280.0070.00020.27
8.0.270.0040.00417.06
8.0.260.0060.00317.31
8.0.250.0030.00317.16
8.0.240.0000.00817.10
8.0.230.0000.00817.11
8.0.220.0070.00317.02
8.0.210.0030.00317.07
8.0.200.0030.00317.10
8.0.190.0070.00017.21
8.0.180.0050.00217.10
8.0.170.0000.00917.02
8.0.160.0000.00716.96
8.0.150.0060.00316.96
8.0.140.0070.00016.95
8.0.130.0030.00313.43
8.0.120.0040.00417.07
8.0.110.0040.00417.05
8.0.100.0000.00717.11
8.0.90.0000.00716.95
8.0.80.0090.00617.09
8.0.70.0050.00217.05
8.0.60.0050.00317.07
8.0.50.0040.00417.07
8.0.30.0080.01017.13
8.0.20.0070.01317.40
8.0.10.0040.00417.00
8.0.00.0120.01216.96
7.4.330.0050.00016.87
7.4.320.0030.00316.79
7.4.300.0030.00316.82
7.4.290.0040.00416.79
7.4.280.0090.00016.75
7.4.270.0000.00716.73
7.4.260.0080.00016.74
7.4.250.0040.00416.81
7.4.240.0000.00716.66
7.4.230.0070.00016.81
7.4.220.0040.00416.97
7.4.210.0050.01016.88
7.4.200.0070.00016.82
7.4.160.0120.00416.81
7.4.140.0170.01417.86
7.4.130.0070.01216.82
7.4.120.0110.00816.67
7.4.110.0060.01116.83
7.4.100.0070.01116.55
7.4.90.0060.01116.65
7.4.80.0130.00519.39
7.4.70.0100.01016.73
7.4.60.0100.01016.80
7.4.50.0150.00316.54
7.4.40.0060.01616.77
7.4.00.0150.00015.07
7.3.330.0030.00313.43
7.3.320.0000.00713.33
7.3.310.0000.00716.46
7.3.300.0000.00816.35
7.3.290.0030.00316.43
7.3.280.0090.01016.42
7.3.260.0110.00916.56
7.3.240.0100.01116.55
7.3.230.0060.01116.56
7.3.210.0060.01116.67
7.3.200.0140.00316.73
7.3.190.0070.01016.53
7.3.180.0100.00616.79
7.3.170.0070.01016.45
7.3.160.0070.01416.74
7.3.10.0140.00716.27
7.3.00.0150.00416.53
7.2.330.0110.00716.93
7.2.320.0120.00616.65
7.2.310.0220.00016.64
7.2.300.0040.01516.93
7.2.290.0060.01116.75
7.2.130.0140.00717.00
7.2.120.0120.01016.63
7.2.110.0120.00916.71
7.2.100.0110.01116.77
7.2.90.0110.00816.69
7.2.80.0050.01016.70
7.2.70.0080.01216.97
7.2.60.0100.00717.01
7.2.50.0170.00316.93
7.2.40.0820.00717.40
7.2.30.0830.00717.33
7.2.20.0970.00617.18
7.2.10.0580.00917.13
7.2.00.0100.00817.16
7.1.250.0080.00915.90
7.1.240.0060.00315.68
7.1.230.0070.00715.76
7.1.220.0030.01016.00
7.1.210.0000.00715.89
7.1.200.0060.00615.96
7.1.190.0080.00515.82
7.1.180.0060.00615.79
7.1.170.0060.00616.07
7.1.160.0080.00716.44
7.1.150.1090.01016.37
7.1.140.1120.01116.37
7.1.130.0270.01116.51
7.1.120.0060.00716.46
7.1.110.0090.00915.98
7.1.100.0780.00815.94
7.1.90.0860.00816.15
7.1.80.0750.01415.91
7.1.70.0040.01015.69
7.1.60.0890.01324.68
7.1.50.0140.01224.46
7.1.40.0170.01424.35
7.1.30.1080.01424.52
7.1.20.0880.01224.61
7.1.10.0810.01015.57
7.1.00.0100.00915.54
7.0.330.0030.00715.40
5.6.380.0050.00514.75

preferences:
37.95 ms | 403 KiB | 5 Q