3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url_host = 'sub.example.com'; $main_url_host = 'example.com'; $current_url_host_rev = strrev( $current_url_host ); $main_url_host_rev = strrev( $main_url_host ); if ( strpos( $current_url_host_rev, $main_url_host_rev ) === 0 ) { echo 'z'; } $current_url_sub_domains = strrev( $current_url_host_rev ); echo $main_url_host_rev;

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.0150.00616.25
8.3.50.0110.00416.22
8.3.40.0130.00318.77
8.3.30.0050.01018.59
8.3.20.0070.00020.09
8.3.10.0040.00423.53
8.3.00.0080.00019.54
8.2.180.0100.01318.04
8.2.170.0120.00622.96
8.2.160.0070.00718.91
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00419.21
8.2.120.0040.00426.35
8.2.110.0060.00319.37
8.2.100.0090.00317.76
8.2.90.0040.00419.17
8.2.80.0030.00517.97
8.2.70.0080.00017.50
8.2.60.0000.00818.04
8.2.50.0000.00818.10
8.2.40.0040.00420.47
8.2.30.0040.00419.26
8.2.20.0040.00417.98
8.2.10.0000.00718.05
8.2.00.0040.00418.19
8.1.280.0070.00725.92
8.1.270.0080.00023.91
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00319.07
8.1.230.0040.00819.07
8.1.220.0000.00817.79
8.1.210.0050.00518.77
8.1.200.0080.00017.23
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0040.00418.52
8.1.160.0050.00219.02
8.1.150.0040.00418.83
8.1.140.0000.00819.51
8.1.130.0030.00318.74
8.1.120.0040.00417.41
8.1.110.0000.00817.36
8.1.100.0000.00817.42
8.1.90.0000.00817.46
8.1.80.0040.00417.43
8.1.70.0040.00417.28
8.1.60.0060.00317.39
8.1.50.0000.00817.46
8.1.40.0030.00617.41
8.1.30.0000.00817.49
8.1.20.0030.00717.53
8.1.10.0040.00417.41
8.1.00.0060.00317.42
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0040.00418.32
8.0.270.0000.00816.70
8.0.260.0000.00718.36
8.0.250.0030.00316.98
8.0.240.0030.00616.96
8.0.230.0030.00316.83
8.0.220.0000.00716.75
8.0.210.0000.00716.79
8.0.200.0000.00716.93
8.0.190.0000.00816.89
8.0.180.0080.00016.94
8.0.170.0000.00816.75
8.0.160.0040.00416.81
8.0.150.0000.00816.68
8.0.140.0040.00416.77
8.0.130.0000.00613.30
8.0.120.0080.00016.75
8.0.110.0050.00316.79
8.0.100.0000.00716.73
8.0.90.0030.00416.75
8.0.80.0100.01016.80
8.0.70.0040.00316.79
8.0.60.0030.00516.74
8.0.50.0070.00016.82
8.0.30.0100.00916.99
8.0.20.0100.00917.40
8.0.10.0030.00316.91
8.0.00.0110.00616.63
7.4.330.0000.00515.55
7.4.320.0000.00616.65
7.4.300.0000.00616.61
7.4.290.0070.00016.43
7.4.280.0090.00316.59
7.4.270.0000.00716.54
7.4.260.0100.00016.59
7.4.250.0040.00416.56
7.4.240.0080.00016.66
7.4.230.0000.00716.56
7.4.220.0100.00716.64
7.4.210.0070.01216.58
7.4.200.0050.00216.52
7.4.160.0080.01316.44
7.4.150.0040.01417.40
7.4.140.0100.00817.86
7.4.130.0090.00916.56
7.4.120.0110.01016.59
7.4.110.0040.01216.52
7.4.100.0160.00616.36
7.4.90.0120.00916.54
7.4.80.0060.01619.39
7.4.70.0080.00816.58
7.4.60.0080.00816.48
7.4.50.0030.01016.46
7.4.40.0100.00716.66
7.4.30.0140.00716.46
7.4.00.0060.01014.63
7.3.330.0030.00313.09
7.3.320.0000.00513.06
7.3.310.0000.00716.20
7.3.300.0030.00316.16
7.3.290.0000.00716.30
7.3.280.0090.00816.27
7.3.270.0100.00717.40
7.3.260.0100.00716.29
7.3.250.0100.00816.37
7.3.240.0150.00416.34
7.3.230.0090.00916.38
7.3.210.0160.00016.59
7.3.200.0030.01316.41
7.3.190.0060.01216.29
7.3.180.0080.00816.25
7.3.170.0100.00716.42
7.3.160.0080.00816.48
7.2.330.0130.00416.60
7.2.320.0110.00616.33
7.2.310.0070.01016.56
7.2.300.0060.01216.75
7.2.290.0090.01216.63
7.2.90.0930.00914.64
7.2.80.1200.00914.92
7.2.70.0390.00614.79
7.2.60.1660.01314.91
7.2.50.0140.00715.02
7.2.40.1860.00714.91
7.2.30.1740.00715.06
7.2.20.1470.00315.03
7.2.10.0780.01014.98
7.2.00.1010.00615.14
7.1.210.0080.01113.84
7.1.200.0100.00613.74
7.1.190.0070.01313.86
7.1.180.0060.00613.93
7.1.170.0360.00814.07
7.1.160.1050.00413.95
7.1.150.1880.00313.91
7.1.140.1170.00613.86
7.1.130.0090.00613.81
7.1.120.0530.00713.59
7.1.110.2040.00713.77
7.1.100.1280.00313.92
7.1.90.0900.00313.86
7.1.80.0870.01013.98
7.1.70.0680.00913.77
7.1.60.0950.00731.81
7.1.50.0840.00931.91
7.1.40.0280.01431.75
7.1.30.0400.01531.90
7.1.20.2640.02331.96
7.1.10.0110.00513.88
7.1.00.0470.00013.84
7.0.310.0040.01513.37
7.0.300.0080.00813.54
7.0.290.1480.01013.50
7.0.280.1690.01013.52
7.0.270.1210.01413.27
7.0.260.0890.00713.12
7.0.250.1410.00613.20
7.0.240.1800.00313.38
7.0.230.0900.01013.57
7.0.220.0990.00713.66
7.0.210.0940.00313.41
7.0.200.1340.00313.57
7.0.190.0160.00513.54
7.0.180.0210.00713.80
7.0.170.1370.00313.56
7.0.160.0130.00713.38
7.0.150.0090.01913.37
7.0.140.0710.00613.57
7.0.130.0140.00713.75
7.0.120.0120.00813.11
7.0.110.1280.00713.09
7.0.100.0230.00313.30
7.0.90.0090.00913.30
7.0.80.0380.00313.35
7.0.70.0430.00413.25
7.0.60.0070.01013.33
7.0.50.1390.00313.67
7.0.40.0700.00313.50
7.0.30.1500.01013.59
7.0.20.0100.01013.21
7.0.10.0220.00313.50
7.0.00.0180.00313.52

preferences:
56.39 ms | 401 KiB | 5 Q