3v4l.org

run code in 300+ PHP versions simultaneously
<?php function endswith($string, $test) { $strlen = strlen($string); $testlen = strlen($test); if ($testlen > $strlen) return false; return substr_compare($string, $test, -$testlen) === 0; } if(false == endswith('http://localhost/events/10','/events/')){ echo "true\n"; } else{ echo "false\n"; } $testlen = strlen('/bob/'); if(false == (substr_compare('http://localhost/events/10','/events/',-$testlen)===0)){ echo "true\n"; } else{ echo "false\n"; } $url = 'http://192.168.1.0/events/10'; //$eventid = intval(strpos($url,'/events/').); $matches = array(); preg_match_all ('^(\d)+^',$url,$matches); foreach( $matches as $match){ echo $match[0]."\n"; }

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.01018.68
8.3.50.0130.00722.05
8.3.40.0060.01219.14
8.3.30.0040.01118.79
8.3.20.0080.00019.02
8.3.10.0080.00021.21
8.3.00.0040.00423.36
8.2.180.0210.00016.63
8.2.170.0110.00422.96
8.2.160.0070.00720.52
8.2.150.0080.00024.18
8.2.140.0110.00424.66
8.2.130.0110.00726.16
8.2.120.0000.00720.92
8.2.110.0030.00619.21
8.2.100.0040.00817.99
8.2.90.0080.00019.34
8.2.80.0090.00018.05
8.2.70.0040.00417.75
8.2.60.0070.00019.39
8.2.50.0000.00818.22
8.2.40.0040.00420.53
8.2.30.0070.00019.25
8.2.20.0070.00017.87
8.2.10.0000.00717.88
8.2.00.0100.00017.91
8.1.280.0060.00925.92
8.1.270.0080.00023.99
8.1.260.0030.00526.35
8.1.250.0030.00528.09
8.1.240.0040.00721.37
8.1.230.0000.01219.06
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0030.00517.35
8.1.180.0050.00318.10
8.1.170.0040.00418.74
8.1.160.0080.00018.84
8.1.150.0040.00422.11
8.1.140.0040.00417.55
8.1.130.0030.00317.78
8.1.120.0020.00517.66
8.1.110.0040.00417.52
8.1.100.0050.00217.67
8.1.90.0040.00417.58
8.1.80.0000.00717.62
8.1.70.0030.00317.52
8.1.60.0030.00517.71
8.1.50.0000.00917.65
8.1.40.0030.00617.65
8.1.30.0000.00817.73
8.1.20.0030.00617.84
8.1.10.0030.00617.72
8.1.00.0000.01017.58
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0030.00518.51
8.0.270.0030.00317.21
8.0.260.0000.00716.99
8.0.250.0000.00717.13
8.0.240.0040.00416.97
8.0.230.0050.00316.97
8.0.220.0070.00017.04
8.0.210.0040.00417.07
8.0.200.0040.00417.02
8.0.190.0000.00717.01
8.0.180.0000.00817.12
8.0.170.0040.00417.09
8.0.160.0000.00717.07
8.0.150.0030.00616.89
8.0.140.0030.00617.06
8.0.130.0050.00013.44
8.0.120.0040.00417.13
8.0.110.0050.00316.88
8.0.100.0030.00516.95
8.0.90.0000.00717.00
8.0.80.0100.00616.94
8.0.70.0000.00816.95
8.0.60.0040.00417.10
8.0.50.0000.00716.94
8.0.30.0140.00917.19
8.0.20.0100.01217.40
8.0.10.0000.00717.08
8.0.00.0090.01216.82
7.4.330.0030.00314.86
7.4.320.0060.00016.74
7.4.300.0030.00316.73
7.4.290.0000.00716.75
7.4.280.0080.00016.80
7.4.270.0020.00516.87
7.4.260.0030.00313.46
7.4.250.0000.00916.68
7.4.240.0030.00316.84
7.4.230.0000.00716.76
7.4.220.0150.00916.92
7.4.210.0090.00816.75
7.4.200.0040.00416.84
7.4.190.0090.00016.87
7.4.160.0130.00316.79
7.4.150.0090.00917.40
7.4.140.0100.00617.86
7.4.130.0090.00816.63
7.4.120.0110.00616.69
7.4.110.0060.01216.71
7.4.100.0060.01216.76
7.4.90.0090.00916.88
7.4.80.0090.00919.37
7.4.70.0130.00316.63
7.4.60.0000.01616.60
7.4.50.0030.00616.73
7.4.40.0090.00322.27
7.4.30.0050.01416.54
7.4.00.0060.01115.04
7.3.330.0020.00213.55
7.3.320.0050.00013.39
7.3.310.0030.00316.36
7.3.300.0000.00716.49
7.3.290.0070.00716.52
7.3.280.0110.00516.55
7.3.270.0080.01117.40
7.3.260.0110.00718.24
7.3.250.0140.00316.51
7.3.240.0080.00816.60
7.3.230.0060.01016.48
7.3.210.0090.01216.56
7.3.200.0130.00619.39
7.3.190.0120.00916.71
7.3.180.0060.01016.59
7.3.170.0110.00616.77
7.3.160.0100.00616.60
7.3.120.0090.00715.13
7.3.110.0100.00614.99
7.3.100.0100.00715.03
7.3.90.0030.00915.11
7.3.80.0080.00414.97
7.3.70.0000.01214.96
7.3.60.0120.00315.18
7.3.50.0000.01114.87
7.3.40.0070.00314.96
7.3.30.0070.00714.95
7.3.20.0090.00616.96
7.3.10.0070.01016.80
7.3.00.0060.00316.70
7.2.330.0120.00616.66
7.2.320.0060.01116.79
7.2.310.0230.00716.91
7.2.300.0070.01116.88
7.2.290.0090.00916.76
7.2.250.0030.01515.16
7.2.240.0030.01715.42
7.2.230.0060.00915.07
7.2.220.0030.01015.45
7.2.210.0060.00915.30
7.2.200.0000.01615.15
7.2.190.0090.00015.17
7.2.180.0070.00715.02
7.2.170.0060.00315.04
7.2.00.0030.01019.58
7.1.330.0030.00916.04
7.1.320.0040.00415.85
7.1.310.0060.00615.75
7.1.300.0050.00316.14
7.1.290.0100.00316.04
7.1.280.0030.01115.84
7.1.270.0030.01415.84
7.1.260.0000.01515.93
7.1.100.0080.00318.04
7.1.70.0030.00717.37
7.1.60.0090.01219.40
7.1.50.0070.01817.23
7.1.00.0000.03722.37
7.0.200.0070.00016.82
7.0.140.0030.06722.21
7.0.70.0030.04321.71
7.0.60.0000.03721.81
7.0.50.0100.02721.96
7.0.40.0070.03020.05
7.0.30.0000.04320.18
7.0.20.0000.03720.11
7.0.10.0000.03720.13
7.0.00.0000.03720.12
5.6.280.0100.06720.95
5.6.220.0000.05320.63
5.6.210.0000.04020.54
5.6.200.0030.03721.15
5.6.190.0000.04021.07
5.6.180.0000.04021.10
5.6.170.0030.03021.17
5.6.160.0030.03021.03
5.6.150.0030.03321.01
5.6.140.0030.04021.04
5.6.130.0030.03721.01
5.6.120.0030.05321.11
5.6.110.0000.03720.93
5.6.100.0000.04021.16
5.6.90.0030.05321.02
5.6.80.0000.08320.50
5.6.70.0000.08320.32
5.6.60.0070.07720.33
5.6.50.0170.07020.43
5.6.40.0030.08020.53
5.6.30.0030.08020.41
5.6.20.0030.08320.33
5.6.10.0100.07320.36
5.6.00.0070.07320.48
5.5.360.0000.04320.36
5.5.350.0000.03320.29
5.5.340.0000.03720.90
5.5.330.0070.02720.83
5.5.320.0030.04020.87
5.5.310.0030.03720.93
5.5.300.0000.04720.80
5.5.290.0000.05020.80
5.5.280.0030.04720.76
5.5.270.0030.08720.79
5.5.260.0030.08020.86
5.5.250.0000.08020.75
5.5.240.0000.08320.02
5.5.230.0030.08020.21
5.5.220.0030.07720.29
5.5.210.0070.07320.19
5.5.200.0100.06720.17
5.5.190.0070.07720.22
5.5.180.0030.07320.29
5.5.160.0000.07720.14
5.5.150.0070.07720.16
5.5.140.0000.08020.18
5.5.130.0030.07320.21
5.5.120.0070.07320.25
5.5.110.0000.08020.15
5.5.100.0070.05320.11
5.5.90.0070.05720.08
5.5.80.0030.05020.07
5.5.70.0030.07020.14
5.5.60.0100.07319.93
5.5.50.0030.07320.09
5.5.40.0030.07320.15
5.5.30.0070.07320.15
5.5.20.0030.08720.13
5.5.10.0030.05720.13
5.5.00.0070.07320.04
5.4.450.0000.03319.37
5.4.440.0000.03319.22
5.4.430.0070.07019.53
5.4.420.0070.07719.36
5.4.410.0000.04719.25
5.4.400.0030.04319.21
5.4.390.0070.08019.21
5.4.380.0070.06319.20
5.4.370.0000.07019.20
5.4.360.0030.07018.95
5.4.350.0070.08018.90
5.4.340.0070.05319.05
5.4.320.0000.08319.09
5.4.310.0030.06719.03
5.4.300.0000.06318.88
5.4.290.0030.08319.20
5.4.280.0070.07319.03
5.4.270.0030.06718.89
5.4.260.0030.06719.02
5.4.250.0100.07319.04
5.4.240.0000.07319.02
5.4.230.0030.07318.87
5.4.220.0000.08319.18
5.4.210.0000.08319.12
5.4.200.0030.07019.03
5.4.190.0000.08019.20
5.4.180.0000.07019.17
5.4.170.0130.05019.14
5.4.160.0030.08019.19
5.4.150.0070.04019.02
5.4.140.0000.03716.38
5.4.130.0070.07316.39
5.4.120.0070.06716.40
5.4.110.0070.07316.51
5.4.100.0070.07016.27
5.4.90.0030.07016.35
5.4.80.0070.06316.49
5.4.70.0030.07316.42
5.4.60.0000.06716.46
5.4.50.0030.05716.30
5.4.40.0070.07016.30
5.4.30.0030.07316.35
5.4.20.0070.06716.42
5.4.10.0030.06716.48
5.4.00.0030.06715.85
5.3.290.0170.06714.68
5.3.280.0030.07314.66
5.3.270.0030.07714.53
5.3.260.0000.04014.71
5.3.250.0000.04014.75
5.3.240.0100.06714.55
5.3.230.0030.07314.59
5.3.220.0070.07714.66
5.3.210.0000.08314.66
5.3.200.0030.06714.59
5.3.190.0030.08014.55
5.3.180.0030.07014.57
5.3.170.0070.07014.53
5.3.160.0070.06714.51
5.3.150.0070.06314.70
5.3.140.0100.06714.54
5.3.130.0000.07714.47
5.3.120.0030.07314.58
5.3.110.0030.07314.61
5.3.100.0030.07713.97
5.3.90.0070.06714.11
5.3.80.0000.06314.12
5.3.70.0070.06713.93
5.3.60.0030.06314.01
5.3.50.0030.05313.83
5.3.40.0000.08013.97
5.3.30.0070.06313.80
5.3.20.0070.06313.77
5.3.10.0000.07713.77
5.3.00.0070.06713.66
5.2.170.0070.05712.26
5.2.160.0000.04712.26
5.2.150.0000.05712.26
5.2.140.0030.06012.26
5.2.130.0030.06012.26
5.2.120.0070.06012.26
5.2.110.0100.05312.26
5.2.100.0070.05712.26
5.2.90.0030.06012.26
5.2.80.0000.07012.26
5.2.70.0030.05312.26
5.2.60.0000.06712.26
5.2.50.0030.04712.26
5.2.40.0000.06712.26
5.2.30.0070.06012.26
5.2.20.0070.05712.26
5.2.10.0030.06012.26
5.2.00.0130.05312.26
5.1.60.0030.05312.26
5.1.50.0000.06012.26
5.1.40.0000.05012.26
5.1.30.0070.04712.26
5.1.20.0070.05012.26
5.1.10.0100.02712.26
5.1.00.0000.05312.26
5.0.50.0000.05012.26
5.0.40.0000.04312.26
5.0.30.0030.06312.26
5.0.20.0000.02712.26
5.0.10.0100.04012.26
5.0.00.0000.06712.26
4.4.90.0030.03312.26
4.4.80.0070.03012.26
4.4.70.0030.03312.26
4.4.60.0000.03712.26
4.4.50.0000.03012.26
4.4.40.0000.05312.26
4.4.30.0000.03312.26
4.4.20.0000.03312.26
4.4.10.0030.03312.26
4.4.00.0000.04312.26
4.3.110.0030.03012.26
4.3.100.0000.03012.26
4.3.90.0030.03012.26
4.3.80.0000.04312.26
4.3.70.0030.03012.26
4.3.60.0000.03312.26
4.3.50.0030.03312.26
4.3.40.0000.05712.26
4.3.30.0000.02712.26
4.3.20.0000.03712.26
4.3.10.0000.03712.26
4.3.00.0000.03312.26

preferences:
52.36 ms | 401 KiB | 5 Q