3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('/^[^.]*\.(?=\w+\.\w+$)/','http://example.com',$matches); $subdomain = isset($matches[0]) ? trim($matches[0],'.') : ''; echo $subdomain;

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.00520.30
8.5.00.0110.01020.21
8.4.150.0030.00014.05
8.4.140.0090.01217.57
8.4.130.0090.01118.64
8.4.120.0120.01018.50
8.4.110.0030.00518.70
8.4.100.0150.00617.76
8.4.90.0110.01020.60
8.4.80.0130.00820.46
8.4.70.0040.00318.78
8.4.60.0080.00820.75
8.4.50.0100.01021.73
8.4.40.0100.01017.84
8.4.30.0110.00820.29
8.4.20.0140.00318.15
8.4.10.0130.00617.83
8.3.280.0150.00518.35
8.3.270.0070.01216.75
8.3.260.0130.00516.64
8.3.250.0090.00718.31
8.3.240.0130.00616.52
8.3.230.0110.00816.61
8.3.220.0120.00620.61
8.3.210.0120.00616.66
8.3.200.0060.00316.54
8.3.190.0110.00918.90
8.3.180.0120.00716.54
8.3.170.0060.01216.31
8.3.160.0110.00718.80
8.3.150.0040.01517.22
8.3.140.0000.01017.23
8.3.130.0080.00818.34
8.3.120.0080.00018.74
8.3.110.0100.00620.94
8.3.100.0080.00024.06
8.3.90.0070.00326.77
8.3.80.0030.00618.44
8.3.70.0070.01016.61
8.3.60.0090.00616.75
8.3.50.0100.01018.08
8.3.40.0140.00720.41
8.3.30.0060.00919.02
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0030.00617.43
8.2.280.0040.00618.26
8.2.270.0060.01216.83
8.2.260.0110.00416.62
8.2.250.0040.00419.21
8.2.240.0100.01019.32
8.2.230.0060.00322.58
8.2.220.0070.00337.54
8.2.210.0090.00926.77
8.2.200.0060.00316.63
8.2.190.0150.00016.58
8.2.180.0110.00725.92
8.2.170.0040.01119.21
8.2.160.0130.00022.96
8.2.150.0070.00025.66
8.2.140.0070.00024.66
8.2.130.0050.00326.16
8.2.120.0090.00026.16
8.2.110.0110.00022.23
8.2.100.0060.00617.84
8.2.90.0060.00317.88
8.2.80.0080.00019.09
8.2.70.0060.00317.50
8.2.60.0040.00417.88
8.2.50.0040.00417.75
8.2.40.0040.00417.97
8.2.30.0080.00018.09
8.2.20.0040.00420.52
8.2.10.0070.00017.77
8.2.00.0040.00419.22
8.1.330.0190.00416.22
8.1.320.0060.01016.24
8.1.310.0040.01117.98
8.1.300.0060.00320.31
8.1.290.0000.00818.88
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0110.00328.09
8.1.240.0060.00322.66
8.1.230.0080.00417.66
8.1.220.0080.00017.77
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0000.00917.22
8.1.180.0030.00618.10
8.1.170.0070.00017.62
8.1.160.0000.00718.91
8.1.150.0000.00718.72
8.1.140.0040.00417.45
8.1.130.0050.00218.75
8.1.120.0040.00417.60
8.1.110.0000.00717.57
8.1.100.0060.00317.54
8.1.90.0040.00417.57
8.1.80.0050.00317.44
8.1.70.0000.00817.60
8.1.60.0040.00417.56
8.1.50.0080.00017.64
8.1.40.0000.00917.52
8.1.30.0030.00617.71
8.1.20.0030.00617.76
8.1.10.0000.00917.74
8.1.00.0000.01017.50
8.0.300.0050.00319.77
8.0.290.0050.00316.88
8.0.280.0030.00318.38
8.0.270.0000.00716.88
8.0.260.0040.00418.52
8.0.250.0000.00716.98
8.0.240.0030.00317.07
8.0.230.0000.00717.02
8.0.220.0040.00416.95
8.0.210.0050.00316.98
8.0.200.0070.00017.02
8.0.190.0040.00417.03
8.0.180.0040.00416.96
8.0.170.0060.00317.00
8.0.160.0000.00916.98
8.0.150.0030.00617.01
8.0.140.0080.00016.77
8.0.130.0030.00516.97
8.0.120.0040.00416.99
8.0.110.0080.00016.95
8.0.100.0050.00516.89
8.0.90.0050.00316.88
8.0.80.0000.00816.94
8.0.70.0030.00616.86
8.0.60.0030.00616.79
8.0.50.0050.00316.86
8.0.30.0040.00416.93
8.0.20.0040.00416.90
8.0.10.0040.00417.15
7.4.330.0060.00015.55
7.4.320.0060.00016.54
7.4.300.0060.00016.72
7.4.290.0070.00016.61
7.4.280.0050.00316.70
7.4.270.0000.00716.63
7.4.260.0000.00716.61
7.4.250.0040.00416.52
7.4.240.0000.00816.72
7.4.230.0000.00816.71
7.4.220.0000.00716.63
7.4.210.0040.00416.72
7.4.200.0070.00016.71
7.4.190.0040.00416.62
7.4.180.0000.00716.68
7.4.160.0000.00916.71
7.4.150.0000.00716.79
7.4.140.0040.00416.54
7.4.130.0070.00016.52
7.4.120.0040.00416.65
7.4.110.0040.00416.68
7.4.100.0030.00516.73
7.4.90.0050.00316.61
7.4.80.0030.00516.63
7.4.70.0000.00716.61
7.4.60.0070.00016.50
7.4.50.0000.00916.56
7.4.40.0060.00316.48
7.4.30.0060.00316.48
7.4.20.0000.00716.59
7.4.10.0030.00316.43
7.4.00.0040.00416.45

preferences:
168.02 ms | 403 KiB | 5 Q