3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This function will take $_SERVER['REQUEST_URI'] and build a breadcrumb based on the user's current path function breadcrumbs($separator = ' &raquo; ', $home = 'Home') { // This gets the REQUEST_URI (/path/to/file.php), splits the string (using '/') into an array, and then filters out any empty values $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))); // This will build our "base URL" ... Also accounts for HTTPS :) $base = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/'; // Initialize a temporary array with our breadcrumbs. (starting with our home page, which I'm assuming will be the base URL) $breadcrumbs = array("<a href=\"$base\">$home</a>"); // Find out the index for the last value in our path array $last = end(array_keys($path)); // Build the rest of the breadcrumbs foreach ($path AS $x => $crumb) { // Our "title" is the text that will be displayed (strip out .php and turn '_' into a space) $title = ucwords(str_replace(array('.php', '_'), array('', ' '), $crumb)); // If we are not on the last index, then display an <a> tag if ($x != $last) $breadcrumbs[] = "<a href=\"$base$crumb\">$title</a>"; // Otherwise, just display the title (minus) else $breadcrumbs[] = $title; } // Build our temporary array (pieces of bread) into one big string :) return implode($separator, $breadcrumbs); } echo breadcrumbs();

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.0070.01416.75
8.3.50.0100.01021.16
8.3.40.0060.01018.70
8.3.30.0080.00818.85
8.3.20.0070.00020.29
8.3.10.0070.00023.61
8.3.00.0040.00419.43
8.2.180.0070.01116.88
8.2.170.0140.00722.96
8.2.160.0000.01419.30
8.2.150.0090.00924.18
8.2.140.0070.01024.66
8.2.130.0080.00026.16
8.2.120.0090.00017.63
8.2.110.0030.00622.07
8.2.100.0040.00817.75
8.2.90.0070.00019.22
8.2.80.0080.00017.97
8.2.70.0000.01117.75
8.2.60.0000.00817.68
8.2.50.0040.00418.07
8.2.40.0040.00421.15
8.2.30.0000.00819.90
8.2.20.0040.00417.73
8.2.10.0070.00018.21
8.2.00.0040.00418.16
8.1.280.0090.00625.92
8.1.270.0120.00620.25
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00022.66
8.1.230.0040.00817.48
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0030.00617.23
8.1.180.0030.00518.10
8.1.170.0000.00818.53
8.1.160.0000.00722.18
8.1.150.0040.00418.81
8.1.140.0030.00517.50
8.1.130.0040.00417.80
8.1.120.0040.00417.44
8.1.110.0050.00317.42
8.1.100.0000.00817.51
8.1.90.0040.00417.39
8.1.80.0030.00517.45
8.1.70.0000.00717.38
8.1.60.0040.00417.60
8.1.50.0050.00317.57
8.1.40.0030.00617.43
8.1.30.0040.00417.53
8.1.20.0050.00317.55
8.1.10.0040.00417.61
8.1.00.0030.00517.48
8.0.300.0000.00718.77
8.0.290.0070.00016.88
8.0.280.0030.00518.38
8.0.270.0000.00817.23
8.0.260.0050.00217.26
8.0.250.0040.00416.99
8.0.240.0000.00816.93
8.0.230.0000.00717.08
8.0.220.0040.00417.02
8.0.210.0090.00016.89
8.0.200.0030.00617.07
8.0.190.0030.00617.03
8.0.180.0040.00417.04
8.0.170.0000.00817.02
8.0.160.0000.00816.96
8.0.150.0040.00416.82
8.0.140.0040.00416.96
8.0.130.0030.00313.47
8.0.120.0080.00016.89
8.0.110.0000.00817.02
8.0.100.0000.00716.77
8.0.90.0000.00716.97
8.0.80.0090.00616.95
8.0.70.0070.00017.00
8.0.60.0000.00816.86
8.0.50.0000.00816.86
8.0.30.0060.01117.04
8.0.20.0110.00817.40
8.0.10.0060.00317.18
8.0.00.0100.01016.84
7.4.330.0030.00315.08
7.4.320.0090.00016.46
7.4.300.0050.00316.55
7.4.290.0000.01116.54
7.4.280.0050.00216.63
7.4.270.0030.00316.68
7.4.260.0080.00316.50
7.4.250.0000.00716.46
7.4.240.0040.00416.57
7.4.230.0000.00716.65
7.4.220.0090.01816.51
7.4.210.0060.00916.64
7.4.200.0000.00716.61
7.4.160.0100.00616.54
7.4.150.0060.01217.40
7.4.140.0110.00717.86
7.4.130.0100.01116.50
7.4.120.0100.00916.57
7.4.110.0160.00016.50
7.4.100.0160.00816.54
7.4.90.0040.01516.50
7.4.80.0120.00619.39
7.4.70.0170.00616.65
7.4.60.0100.00616.64
7.4.50.0040.00416.39
7.4.40.0180.00316.59
7.4.30.0110.00816.61
7.4.00.0060.01214.57
7.3.330.0030.00313.26
7.3.320.0000.00613.40
7.3.310.0030.00516.48
7.3.300.0000.00716.36
7.3.290.0040.00416.48
7.3.280.0090.00816.41
7.3.270.0140.00317.40
7.3.260.0150.00916.45
7.3.250.0140.00616.44
7.3.240.0060.01216.34
7.3.230.0060.01216.52
7.3.210.0080.01116.59
7.3.200.0030.01716.46
7.3.190.0120.00616.66
7.3.180.0070.01016.50
7.3.170.0060.01116.54
7.3.160.0100.00716.41
7.3.10.0060.00616.74
7.3.00.0100.00316.89
7.2.330.0000.01616.56
7.2.320.0120.00616.86
7.2.310.0070.01016.84
7.2.300.0060.01316.81
7.2.290.0000.01616.54
7.2.130.0000.01017.00
7.2.120.0080.00317.13
7.2.110.0000.00917.07
7.2.100.0030.00916.91
7.2.90.0030.01017.01
7.2.80.0030.01017.03
7.2.70.0070.00717.00
7.2.60.0070.00717.05
7.2.50.0070.00416.96
7.2.40.0000.01417.00
7.2.30.0000.01017.22
7.2.20.0110.00717.05
7.2.10.0060.00316.85
7.2.00.0000.01318.10
7.1.250.0000.01315.71
7.1.200.0160.00415.77
7.1.100.0040.00718.04
7.1.70.0000.00817.22
7.1.60.0070.00420.03
7.1.50.0100.00716.77
7.1.00.0030.07322.31
7.0.200.0000.01016.77
7.0.60.0070.08319.98
7.0.50.0030.09017.84
7.0.40.0100.05020.20
7.0.30.0200.03720.08
7.0.20.0230.07320.16
7.0.10.0100.08320.26
7.0.00.0070.07320.24
5.6.280.0070.06321.07
5.6.210.0170.07020.49
5.6.200.0030.05718.15
5.6.190.0100.08720.55
5.6.180.0270.05020.61
5.6.170.0270.03320.55
5.6.160.0070.06720.50
5.6.150.0030.05318.22
5.6.140.0130.07318.12
5.6.130.0000.05718.28
5.6.120.0030.04721.11
5.6.110.0100.07321.02
5.6.100.0070.07020.97
5.6.90.0100.04721.02
5.6.80.0130.07020.48
5.5.350.0070.08320.48
5.5.340.0030.04718.09
5.5.330.0000.05720.13
5.5.320.1230.04320.34
5.5.310.0270.03020.24
5.5.300.0100.08317.98
5.5.290.0030.04718.06
5.5.280.0170.04320.81
5.5.270.0100.05020.73
5.5.260.0100.03320.77
5.5.250.0100.08020.59
5.5.240.0030.07720.27
5.4.450.0670.05019.47
5.4.440.0730.06019.48
5.4.430.0670.06719.16
5.4.420.0800.05019.64
5.4.410.0770.05719.42
5.4.400.0770.05019.23
5.4.390.0730.05318.88
5.4.380.0770.05318.88
5.4.370.0830.07719.15
5.4.360.0630.05018.98
5.4.350.0770.06018.84
5.4.340.0600.05719.23
5.4.320.0530.05719.29
5.4.310.0600.05019.13
5.4.300.0700.05719.13
5.4.290.0830.05719.15
5.4.280.0700.05719.26
5.4.270.0570.05718.87
5.4.260.0470.05718.84
5.4.250.0670.04319.28
5.4.240.0630.04318.99
5.4.230.0530.05319.05
5.4.220.0600.04719.22
5.4.210.0770.05319.28
5.4.200.0870.05719.14
5.4.190.0870.05319.02
5.4.180.0730.05019.14
5.4.170.0570.05019.36
5.4.160.0500.05718.96
5.4.150.0470.06319.15
5.4.140.0600.05016.53
5.4.130.0600.04316.29
5.4.120.0600.05016.36
5.4.110.0500.06016.57
5.4.100.0530.04716.53
5.4.90.0730.05316.43
5.4.80.0600.05716.52
5.4.70.0270.03016.45
5.4.60.0270.05716.49
5.4.50.0000.05016.52
5.4.40.0270.06716.52
5.4.30.0030.03716.34
5.4.20.0300.05716.42
5.4.10.0300.03016.51

preferences:
54.86 ms | 401 KiB | 5 Q