3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Utils { public static function getBaseURLPath() { return '/sub-directory/'; } /** * Returns the part of the URL with the BaseURLPath. * * @param $info * * @return string */ public static function buildWithBaseURLPath($info) { $result = ''; $baseURLPath = self::getBaseURLPath(); if (!empty($baseURLPath) && !empty($info)) { $path = explode('/', $info); if (count($path) > 1) { $info = implode('/', array_filter($path)); } $result .= $baseURLPath . $info; } return $result; } } echo Utils::buildWithBaseURLPath('/sub-directory/saml/acs');

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.110.0060.00320.94
8.3.100.0060.00318.59
8.3.90.0150.00426.77
8.3.80.0030.00617.97
8.3.70.0090.00618.18
8.3.60.0090.00918.42
8.3.50.0070.01116.62
8.3.40.0100.01021.36
8.3.30.0080.01220.59
8.3.20.0060.01223.33
8.3.10.0060.01321.69
8.3.00.0110.00718.96
8.2.230.0110.00422.58
8.2.220.0080.00024.06
8.2.210.0090.00926.77
8.2.200.0060.00318.41
8.2.190.0110.00416.58
8.2.180.0150.00616.38
8.2.170.0110.01118.96
8.2.160.0100.00720.10
8.2.150.0100.01018.86
8.2.140.0040.01220.35
8.2.130.0100.01020.23
8.2.120.0120.00319.21
8.2.110.0130.00719.41
8.2.100.0070.00719.33
8.2.90.0140.00718.83
8.2.80.0100.01019.44
8.2.70.0150.00018.75
8.2.60.0090.00619.02
8.2.50.0170.00318.93
8.2.40.0080.00818.86
8.2.30.0180.00318.69
8.2.20.0040.01218.83
8.2.10.0120.00918.57
8.2.00.0070.01418.83
8.1.290.0030.01030.84
8.1.280.0070.00725.92
8.1.270.0100.01022.08
8.1.260.0130.00622.13
8.1.250.0110.00721.92
8.1.240.0130.00318.65
8.1.230.0070.01018.57
8.1.220.0110.00420.72
8.1.210.0000.01520.34
8.1.200.0120.00318.68
8.1.190.0040.01118.49
8.1.180.0080.00818.43
8.1.170.0090.00618.84
8.1.160.0040.01118.62
8.1.150.0110.00418.82
8.1.140.0080.00618.79
8.1.130.0080.01118.69
8.1.120.0130.00318.50
8.1.110.0060.00918.73
8.1.100.0120.00319.54
8.1.90.0060.00918.54
8.1.80.0110.00719.63
8.1.70.0130.00318.88
8.1.60.0100.00718.52
8.1.50.0070.01018.50
8.1.40.0150.00018.54
8.1.30.0060.00918.85
8.1.20.0040.01119.96
8.1.10.0140.00418.70
8.1.00.0070.00718.51

preferences:
25.49 ms | 403 KiB | 5 Q