3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('/^[^.]*\.(?=\w+\.\w+$)/','subdomain.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.4.120.0160.00424.05
8.4.110.0210.00618.19
8.4.100.0310.00618.16
8.4.90.0300.00818.32
8.4.80.0320.00717.84
8.4.70.0280.00917.88
8.4.60.0240.00718.06
8.4.50.0240.00618.28
8.4.40.0260.00717.61
8.4.30.0300.00818.24
8.4.20.0270.00317.91
8.4.10.0190.00617.76
8.3.250.0080.00518.70
8.3.240.0130.00517.10
8.3.230.0160.00616.50
8.3.220.0170.00517.30
8.3.210.0130.00616.69
8.3.200.0220.00416.69
8.3.190.0210.00616.62
8.3.180.0220.00616.71
8.3.170.0200.00916.73
8.3.160.0230.00617.05
8.3.150.0310.00617.57
8.3.140.0250.01016.49
8.3.130.0180.00616.46
8.3.120.0220.00417.04
8.3.110.0220.00717.70
8.3.100.0230.00618.37
8.3.90.0230.00619.11
8.3.80.0190.00616.90
8.3.70.0230.00916.56
8.3.60.0260.01017.01
8.3.50.0240.00617.04
8.3.40.0270.00718.20
8.3.30.0270.00717.84
8.3.20.0260.00419.24
8.3.10.0200.00719.49
8.3.00.0210.00519.78
8.2.290.0220.00617.73
8.2.280.0240.00717.33
8.2.270.0250.00816.77
8.2.260.0220.00817.60
8.2.250.0260.00516.73
8.2.240.0260.00517.17
8.2.230.0220.00518.08
8.2.220.0290.00521.83
8.2.210.0270.00618.93
8.2.200.0260.00716.53
8.2.190.0260.00916.48
8.2.180.0270.00718.85
8.2.170.0300.00918.11
8.2.160.0290.01019.11
8.2.150.0280.00519.70
8.2.140.0270.00719.39
8.2.130.0210.00519.70
8.2.120.0150.00519.86
8.2.110.0250.00518.34
8.2.100.0240.00517.68
8.2.90.0210.00717.82
8.2.80.0190.00818.08
8.2.70.0190.00417.80
8.2.60.0250.00517.78
8.2.50.0180.00517.91
8.2.40.0150.00517.92
8.2.30.0160.00317.80
8.2.20.0190.00418.41
8.2.10.0180.00817.66
8.2.00.0160.00518.00
8.1.330.0260.00817.59
8.1.320.0270.00916.33
8.1.310.0300.00816.95
8.1.300.0270.00716.76
8.1.290.0260.00716.80
8.1.280.0260.01118.87
8.1.270.0230.00720.52
8.1.260.0290.00519.67
8.1.250.0250.00720.11
8.1.240.0220.00917.94
8.1.230.0270.00617.55
8.1.220.0230.00817.53
8.1.210.0280.00717.67
8.1.200.0250.00817.26
8.1.190.0210.00717.18
8.1.180.0240.00617.41
8.1.170.0270.00717.64
8.1.160.0250.00517.77
8.1.150.0280.00517.69
8.1.140.0270.00717.26
8.1.130.0260.00817.33
8.1.120.0240.00517.44
8.1.110.0240.00917.42
8.1.100.0250.00617.29
8.1.90.0190.00817.29
8.1.80.0250.00817.29
8.1.70.0230.00617.34
8.1.60.0280.00517.44
8.1.50.0210.00617.42
8.1.40.0180.00817.47
8.1.30.0240.00817.49
8.1.20.0210.00617.99
8.1.10.0200.00517.47
8.1.00.0200.00717.49
8.0.300.0210.00617.17
8.0.290.0270.00516.71
8.0.280.0230.00717.31
8.0.270.0230.00717.00
8.0.260.0250.00516.67
8.0.250.0240.00816.78
8.0.240.0250.00516.71
8.0.230.0260.00616.77
8.0.220.0250.00716.67
8.0.210.0270.00716.73
8.0.200.0260.00416.75
8.0.190.0240.00616.80
8.0.180.0240.00616.78
8.0.170.0200.00516.65
8.0.160.0230.00716.83
8.0.150.0230.00516.66
8.0.140.0190.00716.76
8.0.130.0160.00516.74
8.0.120.0170.00616.78
8.0.110.0180.00716.44
8.0.100.0190.00816.81
8.0.90.0190.00816.70
8.0.80.0220.00616.68
8.0.70.0210.00616.74
8.0.60.0240.00516.65
8.0.50.0200.00716.70
8.0.30.0180.00516.73
8.0.20.0200.00716.81
8.0.10.0160.00816.85
7.4.330.0190.00516.24
7.4.320.0190.00616.45
7.4.300.0200.00616.53
7.4.290.0210.00316.25
7.4.280.0230.00616.42
7.4.270.0190.00516.54
7.4.260.0170.00516.45
7.4.250.0190.00516.45
7.4.240.0140.00616.44
7.4.230.0180.00516.47
7.4.220.0200.00516.46
7.4.210.0190.00616.48
7.4.200.0150.00616.45
7.4.190.0160.00616.62
7.4.180.0170.00516.56
7.4.160.0190.00516.57
7.4.150.0180.00816.62
7.4.140.0190.00416.49
7.4.130.0150.00716.53
7.4.120.0150.00516.54
7.4.110.0160.00516.50
7.4.100.0140.00616.55
7.4.90.0180.00616.52
7.4.80.0210.00516.48
7.4.70.0170.00416.54
7.4.60.0170.00616.52
7.4.50.0190.00616.38
7.4.40.0150.00616.43
7.4.30.0190.00516.49
7.4.20.0140.00616.50
7.4.10.0150.00616.46
7.4.00.0150.00616.49

preferences:
28.76 ms | 403 KiB | 5 Q