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.01016.88
8.3.50.0090.00616.36
8.3.40.0000.01618.68
8.3.30.0100.01018.88
8.3.20.0000.00820.39
8.3.10.0060.00323.56
8.3.00.0030.00619.56
8.2.180.0070.01318.51
8.2.170.0040.01522.96
8.2.160.0130.01019.03
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00419.38
8.2.120.0060.00326.35
8.2.110.0060.00320.31
8.2.100.0060.00618.03
8.2.90.0030.00619.08
8.2.80.0040.00417.97
8.2.70.0000.01017.63
8.2.60.0040.00417.91
8.2.50.0000.00918.10
8.2.40.0060.00320.60
8.2.30.0000.00919.20
8.2.20.0080.00018.18
8.2.10.0030.00618.06
8.2.00.0060.00317.95
8.1.280.0090.00925.92
8.1.270.0040.00423.79
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00722.52
8.1.230.0030.01019.17
8.1.220.0030.00717.74
8.1.210.0000.00918.77
8.1.200.0060.00317.48
8.1.190.0060.00317.48
8.1.180.0060.00318.10
8.1.170.0060.00318.67
8.1.160.0050.00319.09
8.1.150.0000.00818.91
8.1.140.0040.00419.65
8.1.130.0040.00418.81
8.1.120.0040.00417.58
8.1.110.0060.00317.60
8.1.100.0050.00317.64
8.1.90.0030.00617.56
8.1.80.0030.00617.48
8.1.70.0030.00517.63
8.1.60.0030.00617.74
8.1.50.0060.00317.56
8.1.40.0090.00017.63
8.1.30.0000.00917.76
8.1.20.0090.00317.72
8.1.10.0040.00417.54
8.1.00.0000.00917.57
8.0.300.0060.00318.77
8.0.290.0080.00016.88
8.0.280.0030.00518.34
8.0.270.0040.00417.30
8.0.260.0030.00616.89
8.0.250.0000.00816.96
8.0.240.0000.00917.07
8.0.230.0040.00417.09
8.0.220.0050.00317.02
8.0.210.0000.00917.02
8.0.200.0040.00416.98
8.0.190.0060.00317.12
8.0.180.0040.00416.94
8.0.170.0030.00616.92
8.0.160.0060.00316.98
8.0.150.0050.00316.96
8.0.140.0040.00417.02
8.0.130.0000.00613.43
8.0.120.0030.00616.90
8.0.110.0030.00616.90
8.0.100.0030.00517.06
8.0.90.0000.00917.07
8.0.80.0100.01716.97
8.0.70.0000.00816.93
8.0.60.0000.00816.85
8.0.50.0040.00416.79
8.0.30.0120.00817.14
8.0.20.0110.01017.40
8.0.10.0040.00417.00
8.0.00.0150.00316.93
7.4.330.0070.00015.55
7.4.320.0040.00416.73
7.4.300.0030.00316.59
7.4.290.0050.00316.56
7.4.280.0030.00616.72
7.4.270.0090.00016.64
7.4.260.0030.00616.71
7.4.250.0030.00716.46
7.4.240.0040.00416.57
7.4.230.0030.00616.76
7.4.220.0130.01616.69
7.4.210.0130.01016.62
7.4.200.0080.00016.49
7.4.160.0070.01116.54
7.4.150.0090.01017.40
7.4.140.0130.01017.86
7.4.130.0210.00916.78
7.4.120.0140.01116.64
7.4.110.0150.00416.65
7.4.100.0330.02116.63
7.4.90.0030.01616.66
7.4.80.0160.00319.39
7.4.70.0100.01616.70
7.4.60.0090.00916.61
7.4.50.0030.00816.52
7.4.40.0140.00516.48
7.4.30.0090.01316.70
7.4.00.0030.01415.14
7.3.330.0000.00713.13
7.3.320.0000.00713.34
7.3.310.0030.00516.24
7.3.300.0000.00816.30
7.3.290.0080.00016.44
7.3.280.0100.00916.41
7.3.270.0060.01317.40
7.3.260.0120.00916.64
7.3.250.0100.01116.48
7.3.240.0110.01116.56
7.3.230.0090.00916.72
7.3.210.0120.01316.44
7.3.200.0090.01216.44
7.3.190.0070.01116.79
7.3.180.0090.00916.51
7.3.170.0110.00716.47
7.3.160.0060.01216.49
7.3.120.0050.01414.90
7.3.110.0070.01414.98
7.3.100.0050.01314.89
7.3.90.0080.00815.10
7.3.80.0020.01314.88
7.3.70.0090.00615.05
7.3.60.0050.01015.01
7.3.50.0060.01114.95
7.3.40.0070.00714.96
7.3.30.0030.01214.98
7.3.20.0020.01416.77
7.3.10.0050.01016.72
7.3.00.0090.00316.87
7.2.330.0060.01616.59
7.2.320.0040.01516.70
7.2.310.0070.01716.77
7.2.300.0070.01116.81
7.2.290.0060.01416.68
7.2.250.0070.01415.23
7.2.240.0080.01314.98
7.2.230.0050.00915.13
7.2.220.0050.01215.03
7.2.210.0090.00914.98
7.2.200.0080.00714.98
7.2.190.0100.00715.09
7.2.180.0040.01115.06
7.2.170.0080.00815.02
7.2.90.0060.00816.36
7.2.80.0080.00816.87
7.2.70.0070.00716.93
7.2.60.0070.01417.01
7.2.50.0790.01516.86
7.2.40.1120.00815.22
7.2.30.0860.00417.11
7.2.20.0110.01117.01
7.2.10.0040.01716.98
7.2.00.0090.00416.91
7.1.330.0040.01015.87
7.1.320.0100.00715.99
7.1.310.0050.01016.12
7.1.300.0070.00915.85
7.1.290.0060.00915.91
7.1.280.0020.01015.90
7.1.270.0020.01415.81
7.1.260.0070.01015.92
7.1.210.0000.01315.88
7.1.200.0060.01115.63
7.1.190.0100.00815.61
7.1.180.0050.01015.70
7.1.170.0090.00915.66
7.1.160.0000.01515.89
7.1.150.0040.01115.80
7.1.140.0060.01015.89
7.1.130.0110.00715.69
7.1.120.0070.01115.93
7.1.110.0090.00416.03
7.1.100.0070.00715.96
7.1.90.0070.00715.80
7.1.80.0000.01516.07
7.1.70.0000.01315.88
7.1.60.0290.00333.86
7.1.50.0210.01133.92
7.1.40.0280.00433.87
7.1.30.0220.01133.91
7.1.20.0300.01234.07
7.1.10.0110.00715.95
7.1.00.0680.00314.10
7.0.310.0040.00815.29
7.0.300.0080.00815.62
7.0.290.0140.00215.70
7.0.280.0080.00515.53
7.0.270.0110.00415.45
7.0.260.0000.01315.63
7.0.250.0040.00915.45
7.0.240.0060.00615.64
7.0.230.0000.01215.38
7.0.220.0030.01015.62
7.0.210.0080.00415.45
7.0.200.0040.00815.59
7.0.190.0100.00315.72
7.0.180.0070.00713.71
7.0.170.0080.01015.24
7.0.160.0060.00715.35
7.0.150.0110.00515.55
7.0.140.1190.00313.90
7.0.130.0060.00615.66
7.0.120.0060.00615.27
7.0.110.0040.00915.68
7.0.100.0030.01015.53
7.0.90.0030.00915.74
7.0.80.0070.01415.48
7.0.70.0030.00915.43
7.0.60.0030.00915.57
7.0.50.0100.00615.48
7.0.40.0000.01215.68
7.0.30.0100.00215.76
7.0.20.0040.00815.77
7.0.10.0060.00615.86
7.0.00.0060.00915.71

preferences:
46.18 ms | 401 KiB | 5 Q