3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "http://myvcilocal.com"; $subdomain="test"; if(trim($subdomain) == '') { return $url; } $new = preg_replace_callback("~^(http://)?(([^.]+)\.)?([^.]+)\.([a-zA-Z0-9]+)(?=/|$)~",function($matches) use ($subdomain) { $matches[3] = $subdomain; print_r($matches); return $matches[3] = $subdomain; },$url); echo $new."\n".$url;

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.0210.00016.88
8.3.50.0120.00318.26
8.3.40.0070.00719.03
8.3.30.0090.00618.76
8.3.20.0080.00020.16
8.3.10.0070.00023.52
8.3.00.0070.00022.46
8.2.180.0030.01416.88
8.2.170.0070.01022.96
8.2.160.0070.00719.51
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00422.45
8.2.120.0060.00326.35
8.2.110.0000.01019.32
8.2.100.0040.00718.03
8.2.90.0040.00419.20
8.2.80.0000.00819.37
8.2.70.0030.00517.75
8.2.60.0040.00418.05
8.2.50.0060.00318.10
8.2.40.0040.00422.50
8.2.30.0030.00619.43
8.2.20.0020.00517.91
8.2.10.0000.00818.27
8.2.00.0040.00417.93
8.1.280.0140.00425.92
8.1.270.0040.00423.91
8.1.260.0050.00228.09
8.1.250.0040.00428.09
8.1.240.0030.00623.91
8.1.230.0050.00517.77
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0000.01017.48
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00520.49
8.1.160.0040.00422.11
8.1.150.0040.00418.94
8.1.140.0030.00619.63
8.1.130.0070.00017.69
8.1.120.0040.00417.63
8.1.110.0040.00417.66
8.1.100.0070.00017.53
8.1.90.0040.00417.52
8.1.80.0000.00717.64
8.1.70.0030.00317.62
8.1.60.0000.00917.82
8.1.50.0050.00417.69
8.1.40.0050.00317.75
8.1.30.0090.00017.74
8.1.20.0040.00417.77
8.1.10.0040.00417.71
8.1.00.0030.00617.57
8.0.300.0080.00020.02
8.0.290.0000.01116.88
8.0.280.0000.00818.35
8.0.270.0030.00317.30
8.0.260.0000.00617.33
8.0.250.0070.00017.11
8.0.240.0000.00817.00
8.0.230.0070.00017.17
8.0.220.0080.00017.05
8.0.210.0000.00816.96
8.0.200.0050.00317.10
8.0.190.0060.00317.02
8.0.180.0040.00416.96
8.0.170.0080.00017.08
8.0.160.0000.00717.07
8.0.150.0040.00416.97
8.0.140.0070.00017.07
8.0.130.0030.00313.52
8.0.120.0040.00416.98
8.0.110.0060.00316.93
8.0.100.0040.00416.86
8.0.90.0000.00717.05
8.0.80.0030.01216.96
8.0.70.0000.00717.04
8.0.60.0040.00416.95
8.0.50.0030.00516.96
8.0.30.0080.01217.09
8.0.20.0090.01017.42
8.0.10.0000.00717.21
8.0.00.0110.00716.89
7.4.330.0050.00015.11
7.4.320.0060.00016.59
7.4.300.0030.00316.71
7.4.290.0030.00316.72
7.4.280.0080.00016.73
7.4.270.0000.00716.84
7.4.260.0080.00316.61
7.4.250.0070.00016.79
7.4.240.0030.00316.75
7.4.230.0000.00716.53
7.4.220.0130.00916.75
7.4.210.0100.00516.65
7.4.200.0000.00716.73
7.4.160.0110.00616.73
7.4.150.0090.00917.40
7.4.140.0120.00617.86
7.4.130.0160.00316.63
7.4.120.0090.01016.79
7.4.110.0030.01516.86
7.4.100.0040.01316.52
7.4.90.0130.00316.69
7.4.80.0100.01019.39
7.4.70.0140.00316.84
7.4.60.0160.00016.75
7.4.50.0060.00916.70
7.4.40.0080.01216.73
7.4.30.0100.00716.77
7.4.00.0030.01015.31
7.3.330.0050.00013.54
7.3.320.0000.00613.48
7.3.310.0040.00416.38
7.3.300.0040.00416.47
7.3.290.0070.00016.62
7.3.280.0070.01116.53
7.3.270.0150.00417.40
7.3.260.0110.00716.59
7.3.250.0110.00616.63
7.3.240.0100.00916.61
7.3.230.0070.01116.57
7.3.210.0130.00316.49
7.3.200.0100.00616.81
7.3.190.0100.01016.57
7.3.180.0150.00316.76
7.3.170.0060.01616.70
7.3.160.0040.01316.66
7.2.330.0070.01116.82
7.2.320.0170.00616.94
7.2.310.0040.01916.87
7.2.300.0080.00816.94
7.2.290.0000.01716.74
7.2.60.0000.01517.16
7.2.00.0030.01019.44
7.1.200.0030.00915.91
7.1.100.0090.00318.53
7.1.70.0040.00417.58
7.1.60.0070.01317.20
7.1.00.0000.08022.44
7.0.200.0380.00915.10
7.0.100.0300.05020.02
7.0.90.0230.05719.96
7.0.80.0130.06719.98
7.0.70.0230.05319.99
7.0.60.0330.05019.97
7.0.50.0300.07720.34
7.0.40.0230.07320.29
7.0.30.0330.05320.40
7.0.20.0270.05720.46
7.0.10.0270.05720.32
7.0.00.0330.06320.36
5.6.250.0200.04720.64
5.6.240.0200.05020.82
5.6.230.0170.05020.81
5.6.220.0070.06020.73
5.6.210.0070.06020.69
5.6.200.0300.04321.20
5.6.190.0030.06021.18
5.6.180.0030.06321.15
5.6.170.0130.06321.21
5.6.160.0070.08021.09
5.6.150.0100.06321.09
5.6.140.0170.05021.08
5.6.130.0130.05721.10
5.6.120.0030.06321.13
5.6.110.0200.05321.08
5.6.100.0130.05321.16
5.6.90.0130.05321.16
5.6.80.0070.06020.46
5.6.70.0130.05020.46
5.6.60.0170.04720.47
5.6.50.0130.04720.47
5.6.40.0100.05320.52
5.6.30.0000.06020.46
5.6.20.0030.06020.43
5.6.10.0130.05020.56
5.6.00.0070.05720.37

preferences:
121.86 ms | 400 KiB | 5 Q