3v4l.org

run code in 300+ PHP versions simultaneously
<?php $types = array( 'jsfiddle' => array( array( 'https?:\/\/(?:www)?\.?jsfiddle\.net[\w\/-]*\/([a-z\d]{8}(?:\/\d+)?)\/?', '<div class="jsfiddle-embed-wrap"><iframe class="iframe-jsfiddle" src="//jsfiddle.net/$1/embedded/result,js,html,css/"></iframe></div>' ), ), // youtube, replit, ... ); $text = 'https://jsfiddle.net/kai_noack/h1jf34za/11/'; foreach($types as $t => $ra) { // $t is youtube, jsfiddle, replit // $ra is array with replacements $ra[0] regex, $ra[1] embed code foreach($ra as $r) { $text = preg_replace('/<a[^>]+>'.$r[0].'<\/a>/i', $r[1], $text); $text = preg_replace('/(?<![\'"=])'.$r[0].'/i', $r[1], $text); } } echo $text;

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.70.0090.00617.00
8.3.60.0070.01118.43
8.3.50.0120.00318.24
8.3.40.0070.00718.97
8.3.30.0110.00419.00
8.3.20.0040.00421.95
8.3.10.0040.00423.57
8.3.00.0040.00423.57
8.2.190.0140.00720.25
8.2.180.0190.00318.54
8.2.170.0060.01522.96
8.2.160.0100.00320.57
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0080.00021.25
8.2.110.0030.00721.14
8.2.100.0040.00717.91
8.2.90.0030.00519.17
8.2.80.0040.00417.97
8.2.70.0070.00317.88
8.2.60.0040.00417.93
8.2.50.0050.00318.10
8.2.40.0090.00020.07
8.2.30.0040.00418.05
8.2.20.0030.00618.07
8.2.10.0060.00319.28
8.2.00.0040.00419.44
8.1.280.0150.00025.92
8.1.270.0000.00918.98
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0080.00420.68
8.1.230.0040.01117.89
8.1.220.0000.00817.77
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0040.00817.23
8.1.180.0030.00518.10
8.1.170.0000.00818.72
8.1.160.0030.00618.84
8.1.150.0050.00218.81
8.1.140.0040.00422.05
8.1.130.0000.00720.25
8.1.120.0000.00717.60
8.1.110.0080.00017.66
8.1.100.0050.00317.51
8.1.90.0000.00817.52
8.1.80.0040.00417.65
8.1.70.0000.00717.64
8.1.60.0030.00517.79
8.1.50.0030.00517.61
8.1.40.0030.00517.66
8.1.30.0040.00417.86
8.1.20.0030.00617.68
8.1.10.0080.00017.66
8.1.00.0000.00817.75
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0000.00818.50
8.0.270.0000.00717.32
8.0.260.0000.00618.45
8.0.250.0070.00017.18
8.0.240.0000.00717.10
8.0.230.0000.00717.02
8.0.220.0030.00317.09
8.0.210.0100.00016.93
8.0.200.0000.00717.05
8.0.190.0080.00017.12
8.0.180.0040.00417.09
8.0.170.0040.00417.13
8.0.160.0000.00716.95
8.0.150.0040.00416.96
8.0.140.0000.00717.00
8.0.130.0060.00013.45
8.0.120.0000.00816.98
8.0.110.0030.00617.07
8.0.100.0040.00417.08
8.0.90.0020.00516.86
8.0.80.0110.00717.06
8.0.70.0070.00017.02
8.0.60.0040.00416.94
8.0.50.0040.00416.93
8.0.30.0100.00817.48
8.0.20.0110.00717.45
8.0.10.0050.00217.23
8.0.00.0050.01316.96
7.4.330.0020.00216.80
7.4.320.0070.00016.76
7.4.300.0000.00716.73
7.4.290.0050.00216.64
7.4.280.0000.00816.81
7.4.270.0050.00316.76
7.4.260.0000.00716.71
7.4.250.0050.00316.59
7.4.240.0040.00416.85
7.4.230.0000.00816.57
7.4.220.0040.00416.82
7.4.210.0070.01216.77
7.4.200.0040.00416.89
7.4.160.0090.00816.69
7.4.140.0100.01017.86
7.4.130.0130.01216.79
7.4.120.0070.01116.77
7.4.110.0190.00016.73
7.4.100.0060.01316.47
7.4.90.0100.00716.81
7.4.80.0040.01419.39
7.4.70.0030.01216.73
7.4.60.0030.01316.78
7.4.50.0110.00716.61
7.4.40.0100.00716.77
7.4.00.0040.01115.11
7.3.330.0000.00513.23
7.3.320.0000.00613.41
7.3.310.0060.00316.33
7.3.300.0070.00016.32
7.3.290.0030.00316.42
7.3.280.0030.01216.46
7.3.260.0080.00916.60
7.3.240.0150.00516.53
7.3.230.0100.00716.82
7.3.210.0030.01416.83
7.3.200.0190.00016.51
7.3.190.0080.00816.71
7.3.180.0090.01416.51
7.3.170.0160.00616.54
7.3.160.0050.01116.51
7.3.120.0030.01215.03
7.3.110.0040.01415.08
7.3.100.0070.00715.04
7.3.90.0070.00715.09
7.3.80.0140.00015.14
7.3.70.0100.00314.89
7.3.60.0160.00015.05
7.3.50.0070.00414.93
7.3.40.0040.00715.15
7.3.30.0030.00614.95
7.3.20.0030.01016.77
7.3.10.0090.00616.75
7.3.00.0260.00316.20
7.2.330.0070.01016.92
7.2.320.0110.00616.74
7.2.310.0060.01516.90
7.2.300.0090.01216.78
7.2.290.0100.00716.94
7.2.240.0030.01015.29
7.2.230.0030.01015.45
7.2.220.0100.00715.05
7.2.210.0000.00815.08
7.2.200.0060.00915.29
7.2.190.0030.01215.34
7.2.180.0000.01215.24
7.2.170.0080.00815.18
7.2.160.0110.00715.30
7.2.150.0030.01217.28
7.2.140.0090.00317.09
7.2.130.0190.01016.46
7.2.120.0320.00716.53
7.2.110.0090.00616.52
7.2.100.0310.00616.56
7.2.90.0080.00816.52
7.2.80.0230.00716.61
7.2.70.0070.00716.46
7.2.60.0200.00916.55
7.2.50.0070.01116.45
7.2.40.0250.00616.52
7.2.30.0190.00616.59
7.2.20.0050.01116.56
7.2.10.0350.00516.46
7.2.00.0220.00716.53
7.1.330.0080.00416.04
7.1.320.0060.00616.14
7.1.310.0030.00715.82
7.1.300.0040.01115.96
7.1.290.0040.01115.95
7.1.280.0000.01115.94
7.1.270.0060.01015.93
7.1.260.0060.00616.09
7.1.250.0310.00415.51
7.0.330.0720.01013.36
5.6.380.0120.00314.65

preferences:
18.1 ms | 401 KiB | 5 Q