3v4l.org

run code in 300+ PHP versions simultaneously
<?php $main_url_host = 'main.example.com'; $current_url_host = 'subdomain.main.example.com'; preg_match('~(.+)*\.' . $main_url_host. '$~', $current_url_host, $matches ); var_dump( $matches );

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.0100.01316.62
8.3.50.0120.00316.48
8.3.40.0030.01318.88
8.3.30.0000.01518.90
8.3.20.0030.00520.24
8.3.10.0030.00623.61
8.3.00.0080.00019.68
8.2.180.0170.00318.51
8.2.170.0130.00622.96
8.2.160.0110.00419.21
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00019.17
8.2.120.0000.00826.35
8.2.110.0060.00322.32
8.2.100.0100.00318.03
8.2.90.0000.00919.08
8.2.80.0060.00317.97
8.2.70.0000.01117.75
8.2.60.0030.00618.05
8.2.50.0000.00918.10
8.2.40.0000.00920.60
8.2.30.0030.00719.14
8.2.20.0030.00618.12
8.2.10.0100.00018.01
8.2.00.0040.00418.11
8.1.280.0070.01025.92
8.1.270.0060.00323.97
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0080.00324.02
8.1.230.0000.01122.17
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00717.25
8.1.190.0000.00917.23
8.1.180.0040.00418.10
8.1.170.0030.00618.77
8.1.160.0050.00318.95
8.1.150.0040.00418.83
8.1.140.0040.00419.59
8.1.130.0040.00417.59
8.1.120.0000.00817.64
8.1.110.0000.00917.46
8.1.100.0000.00917.60
8.1.90.0000.00917.58
8.1.80.0000.01017.59
8.1.70.0000.00817.59
8.1.60.0060.00317.75
8.1.50.0030.00617.68
8.1.40.0030.00617.53
8.1.30.0030.00617.81
8.1.20.0060.00617.71
8.1.10.0000.00817.69
8.1.00.0040.00417.57
8.0.300.0030.00618.77
8.0.290.0030.00617.00
8.0.280.0040.00418.44
8.0.270.0050.00317.33
8.0.260.0030.00716.95
8.0.250.0000.00817.07
8.0.240.0030.00617.13
8.0.230.0060.00317.10
8.0.220.0050.00316.99
8.0.210.0030.00616.91
8.0.200.0040.00417.07
8.0.190.0030.00617.06
8.0.180.0040.00417.07
8.0.170.0040.00416.93
8.0.160.0040.00417.11
8.0.150.0030.00517.03
8.0.140.0040.00417.00
8.0.130.0000.00613.49
8.0.120.0030.00617.02
8.0.110.0040.00417.02
8.0.100.0000.00816.97
8.0.90.0040.00417.04
8.0.80.0080.01716.93
8.0.70.0040.00416.97
8.0.60.0030.00616.86
8.0.50.0000.00816.84
8.0.30.0130.00617.08
8.0.20.0100.01117.40
8.0.10.0060.00317.09
8.0.00.0060.01216.90
7.4.330.0000.00615.55
7.4.320.0070.00016.63
7.4.300.0040.00416.72
7.4.290.0050.00316.77
7.4.280.0040.00416.77
7.4.270.0000.00816.74
7.4.260.0030.00616.52
7.4.250.0040.00416.74
7.4.240.0000.00916.54
7.4.230.0030.00616.77
7.4.220.0100.01016.63
7.4.210.0110.01116.83
7.4.200.0080.00016.64
7.4.160.0070.01116.54
7.4.150.0040.01717.40
7.4.140.0100.01317.86
7.4.130.0090.02016.66
7.4.120.0140.01116.61
7.4.110.0140.00416.49
7.4.100.0100.01016.93
7.4.90.0060.02016.57
7.4.80.0140.00619.39
7.4.70.0060.01316.66
7.4.60.0090.00916.65
7.4.50.0040.01216.46
7.4.40.0070.01116.48
7.4.30.0150.01316.54
7.4.10.0030.01716.59
7.4.00.0080.01015.88
7.3.330.0020.00513.27
7.3.320.0060.00013.27
7.3.310.0000.00816.26
7.3.300.0000.00816.32
7.3.290.0040.00416.27
7.3.280.0080.01016.45
7.3.270.0190.00017.40
7.3.260.0090.01216.61
7.3.250.0110.01016.52
7.3.240.0060.01316.38
7.3.230.0090.00916.43
7.3.210.0150.00616.66
7.3.200.0040.01316.63
7.3.190.0040.01416.68
7.3.180.0060.01216.38
7.3.170.0120.00616.50
7.3.160.0120.00616.52
7.3.130.0100.00716.43
7.3.120.0060.01416.44
7.3.110.0000.01616.63
7.3.100.0060.01016.38
7.3.90.0070.01016.42
7.3.80.0040.01416.45
7.3.70.0100.00716.52
7.3.60.0080.00816.48
7.3.50.0070.00716.47
7.3.40.0090.00616.31
7.3.30.0060.00916.58
7.3.20.0030.01018.21
7.3.10.0060.00817.64
7.3.00.0040.00917.65
7.2.330.0110.01416.80
7.2.320.0130.00616.67
7.2.310.0130.00616.67
7.2.300.0200.00716.95
7.2.290.0080.01316.80
7.2.260.0070.01416.51
7.2.250.0030.01416.68
7.2.240.0000.01516.68
7.2.230.0100.01016.80
7.2.220.0040.01416.83
7.2.210.0070.01016.79
7.2.200.0060.01216.55
7.2.190.0030.01316.60
7.2.180.0070.01116.76
7.2.170.0070.01016.64
7.2.160.0000.01116.52
7.2.150.0030.01318.45
7.2.140.0040.00818.44
7.2.130.0070.00717.65
7.2.120.0090.00617.45
7.2.110.0030.00917.31
7.2.100.0050.01017.30
7.2.90.1010.01116.73
7.2.80.1000.00616.77
7.2.70.0080.01216.81
7.2.60.0060.01116.72
7.2.50.0540.00616.89
7.2.40.0070.01116.85
7.2.30.0070.00916.87
7.2.20.0110.00816.72
7.2.10.0120.00816.87
7.2.00.0070.01016.91
7.1.330.0090.00317.37
7.1.320.0070.00717.22
7.1.310.0110.00717.49
7.1.300.0100.00617.53
7.1.290.0040.01417.45
7.1.280.0030.01417.31
7.1.270.0030.00917.50
7.1.260.0080.00817.40
7.1.250.0110.00516.70
7.1.240.0050.00516.66
7.1.230.0020.01516.52
7.1.220.0050.00916.77
7.1.210.1400.01015.73
7.1.200.0920.00715.90
7.1.190.0170.01015.68
7.1.180.0910.01015.72
7.1.170.0100.00715.88
7.1.160.0550.00615.76
7.1.150.0230.00815.63
7.1.140.0090.00815.81
7.1.130.0100.01015.83
7.1.120.0240.00815.84
7.1.110.0070.01115.76
7.1.100.0080.01015.75
7.1.90.0060.01315.78
7.1.80.1030.00615.76
7.1.70.0400.01415.77
7.1.60.0180.00821.95
7.1.50.0180.00921.97
7.1.40.0210.01021.88
7.1.30.0520.01221.88
7.1.20.0200.01221.94
7.1.10.0110.00815.74
7.1.00.0060.00815.79
7.0.330.0070.00717.30
7.0.320.0050.00716.37
7.0.310.1000.01015.36
7.0.300.0360.00715.62
7.0.290.0070.00715.53
7.0.280.0050.00715.47
7.0.270.0110.00715.44
7.0.260.0260.00915.38
7.0.250.0230.01015.41
7.0.240.0050.01215.57
7.0.230.1330.01415.47
7.0.220.1030.01015.45
7.0.210.0610.01015.53
7.0.200.0080.01015.49
7.0.190.0320.01015.56
7.0.180.0090.01015.36
7.0.170.0100.00615.43
7.0.160.0200.00915.56
7.0.150.0100.00915.52
7.0.140.0190.00915.51
7.0.130.0070.01115.51
7.0.120.0130.01215.43
7.0.110.0110.01115.57
7.0.100.0100.00915.44
7.0.90.0210.01115.55
7.0.80.0060.00615.41
7.0.70.0070.00915.41
7.0.60.0240.00915.46
7.0.50.0180.00715.59
7.0.40.0310.00814.08
7.0.30.0050.01014.29
7.0.20.0080.00814.40
7.0.10.0100.00714.24
7.0.00.0360.01014.21
5.6.400.0040.04215.87
5.6.390.0030.03515.98
5.6.380.0030.03214.81
5.6.370.0070.03916.08
5.6.360.0100.03315.97
5.6.350.0000.03915.87
5.6.340.0070.03315.70
5.6.330.0000.03415.77
5.6.320.0070.02815.88
5.6.310.0000.04215.78
5.6.300.0030.03515.82
5.6.290.0030.03615.69
5.6.280.0060.03115.63
5.6.270.0070.03916.00
5.6.260.0060.03215.71
5.6.250.0090.02515.98
5.6.240.0100.02915.88
5.6.230.0060.03215.77
5.6.220.0120.02815.73
5.6.210.0000.03715.77
5.6.200.0030.03615.84
5.6.190.0030.03515.74
5.6.180.0060.02915.76
5.6.170.0070.03515.65
5.6.160.0120.02515.77
5.6.150.0060.04215.75
5.6.140.0070.03615.94
5.6.130.0000.04316.00
5.6.120.0000.04015.87
5.6.110.0100.03115.83
5.6.100.0030.04015.77
5.6.90.0060.03615.72
5.6.80.0030.03415.96
5.6.70.0100.02915.69
5.6.60.0030.03615.77
5.6.50.0060.02715.88
5.6.40.0030.03615.53
5.6.30.0000.04115.78
5.6.20.0070.03315.70
5.6.10.0070.02815.75
5.6.00.0070.02915.87

preferences:
42.37 ms | 400 KiB | 5 Q