3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attributes = array(); $htmlcontent = '<img alt="" src="{assets_2100:{filedir_12}HappyDog.jpg}" style="height:400px; width:100px">'; preg_replace_callback('/src=(\'|")(.*?)\1/', function($matches) use ($attributes) { global $attributes; $terms = preg_split('/\{|\}/', $matches[2], -1, PREG_SPLIT_NO_EMPTY); foreach($terms as $key => $term) { if($key != (count($terms) - 1)) { $params = explode('_', $term); $attributes['data-' . rtrim($params[0], ':')] = $params[1]; } else { $attributes['src'] = 'uploads/' . $term; } } }, $htmlcontent); print_r($attributes);

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.0040.01118.68
8.3.60.0090.00618.30
8.3.50.0070.00718.33
8.3.40.0040.01118.92
8.3.30.0110.01118.96
8.3.20.0100.00019.23
8.3.10.0040.00421.78
8.3.00.0080.00019.81
8.2.190.0110.01116.75
8.2.180.0120.00818.50
8.2.170.0040.01122.96
8.2.160.0110.00819.14
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0040.00419.69
8.2.120.0060.00326.35
8.2.110.0080.00321.30
8.2.100.0090.00317.91
8.2.90.0050.00318.16
8.2.80.0040.00417.97
8.2.70.0100.00018.04
8.2.60.0040.00418.09
8.2.50.0000.00818.10
8.2.40.0090.00019.11
8.2.30.0050.00319.62
8.2.20.0040.00418.06
8.2.10.0000.00718.25
8.2.00.0050.00319.46
8.1.280.0030.01425.92
8.1.270.0000.00823.82
8.1.260.0040.00426.35
8.1.250.0150.00028.09
8.1.240.0040.00723.76
8.1.230.0000.01120.89
8.1.220.0040.00417.74
8.1.210.0000.00918.84
8.1.200.0060.00317.50
8.1.190.0060.00317.35
8.1.180.0030.00618.10
8.1.170.0040.00418.91
8.1.160.0030.00518.86
8.1.150.0020.00519.00
8.1.140.0080.00017.76
8.1.130.0000.00718.99
8.1.120.0000.00717.67
8.1.110.0100.00017.67
8.1.100.0000.00717.54
8.1.90.0040.00417.56
8.1.80.0110.00017.66
8.1.70.0080.00017.64
8.1.60.0100.00417.73
8.1.50.0030.00617.71
8.1.40.0040.00417.55
8.1.30.0060.00317.86
8.1.20.0080.00017.85
8.1.10.0030.00617.66
8.1.00.0040.00417.70
8.0.300.0050.00320.02
8.0.290.0090.00016.75
8.0.280.0030.00318.48
8.0.270.0000.00917.25
8.0.260.0040.00417.30
8.0.250.0000.00817.12
8.0.240.0000.00717.05
8.0.230.0000.00717.11
8.0.220.0040.00416.93
8.0.210.0000.00717.03
8.0.200.0060.00016.96
8.0.190.0050.00217.01
8.0.180.0000.00816.98
8.0.170.0080.00417.12
8.0.160.0080.00017.04
8.0.150.0040.00416.83
8.0.140.0100.00017.04
8.0.130.0030.00313.52
8.0.120.0040.00417.00
8.0.110.0000.00717.05
8.0.100.0070.00017.17
8.0.90.0000.00717.03
8.0.80.0020.01517.05
8.0.70.0040.00417.12
8.0.60.0070.00017.03
8.0.50.0060.00316.93
8.0.30.0090.00917.45
8.0.20.0130.00717.44
8.0.10.0050.00317.02
8.0.00.0110.00617.08
7.4.330.0000.00615.55
7.4.320.0040.00416.79
7.4.300.0000.00716.73
7.4.290.0000.00916.80
7.4.280.0040.00416.84
7.4.270.0080.00016.85
7.4.260.0030.00316.86
7.4.250.0040.00416.84
7.4.240.0030.00616.86
7.4.230.0030.00316.57
7.4.220.0000.00816.89
7.4.210.0030.01316.79
7.4.200.0030.00316.85
7.4.140.0070.01117.86
7.4.130.0060.01216.78
7.4.120.0080.01216.76
7.4.110.0110.01416.79
7.4.100.0000.01616.64
7.4.90.0070.01016.64
7.4.80.0210.00719.39
7.4.70.0100.00616.82
7.4.60.0040.01116.67
7.4.50.0030.01016.69
7.4.40.0170.00616.67
7.4.00.0070.01015.14
7.3.330.0000.00513.48
7.3.320.0000.00613.35
7.3.310.0030.00316.54
7.3.300.0030.00316.52
7.3.290.0080.00016.54
7.3.280.0050.01016.53
7.3.260.0080.00916.65
7.3.240.0090.01016.74
7.3.230.0030.01516.63
7.3.210.0110.01116.71
7.3.200.0060.00916.55
7.3.190.0140.00616.79
7.3.180.0060.01616.52
7.3.170.0040.01316.73
7.3.160.0130.00316.52
7.2.330.0070.01016.71
7.2.320.0100.00716.90
7.2.310.0090.01116.90
7.2.300.0190.00716.88
7.2.290.0090.01516.83
7.2.40.2510.00818.08
7.2.30.2710.00618.36
7.2.20.2800.01218.30
7.2.10.2350.01418.13
7.2.00.2610.01018.23
7.1.200.0080.00015.78
7.1.160.2470.01017.21
7.1.150.2340.01017.24
7.1.140.2620.00817.18
7.1.130.2480.00817.02
7.1.120.2660.01117.34
7.1.110.2710.01116.06
7.1.100.2660.01016.82
7.1.90.2820.00616.69
7.1.80.2420.00916.60
7.1.70.2700.00915.74
7.1.60.2860.00633.53
7.1.50.3070.01132.96
7.1.40.2750.01132.91
7.1.30.2930.01132.94
7.1.20.2980.01032.92
7.1.10.2720.01014.93
7.1.00.2470.00815.08

preferences:
18.66 ms | 401 KiB | 5 Q