3v4l.org

run code in 300+ PHP versions simultaneously
<?php function joinPath() { $path = ''; $arguments = func_get_args(); $args = array(); foreach($arguments as $a) if($a !== '') $args[] = $a;//Removes the empty elements $arg_count = count($args); for($i=0; $i<$arg_count; $i++) { $folder = $args[$i]; if($i != 0 and $folder[0] == DIRECTORY_SEPARATOR) $folder = substr($folder,1); //Remove the first char if it is a '/' - and its not in the first argument if($i != $arg_count-1 and substr($folder,-1) == DIRECTORY_SEPARATOR) $folder = substr($folder,0,-1); //Remove the last char - if its not in the last argument $path .= $folder; if($i != $arg_count-1) $path .= DIRECTORY_SEPARATOR; //Add the '/' if its not the last element. } return $path; } print(joinPath("blah", "", "gda", ""));

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.40.0040.01118.81
8.3.30.0090.00618.79
8.3.20.0070.00718.77
8.3.10.0040.00418.73
8.3.00.0040.00419.27
8.2.170.0130.00322.96
8.2.160.0060.00918.95
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00019.79
8.2.110.0050.00520.35
8.2.100.0110.00019.64
8.2.90.0050.00317.75
8.2.80.0000.00918.81
8.2.70.0040.00417.63
8.2.60.0070.00017.93
8.2.50.0000.00918.07
8.2.40.0060.00319.48
8.2.30.0040.00417.79
8.2.20.0040.00417.63
8.2.10.0000.00717.73
8.2.00.0040.00417.74
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00323.96
8.1.230.0040.00817.71
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0100.00117.10
8.1.190.0030.00517.23
8.1.180.0050.00318.10
8.1.170.0000.00818.83
8.1.160.0040.00419.01
8.1.150.0040.00418.71
8.1.140.0000.01017.40
8.1.130.0000.00719.11
8.1.120.0040.00417.47
8.1.110.0050.00217.51
8.1.100.0000.00717.50
8.1.90.0040.00417.48
8.1.80.0000.00717.51
8.1.70.0030.00317.42
8.1.60.0090.00017.60
8.1.50.0050.00317.57
8.1.40.0000.00717.49
8.1.30.0040.00417.51
8.1.20.0050.00717.64
8.1.10.0040.00417.66
8.1.00.0040.00417.49
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0040.00418.62
8.0.270.0000.00717.25
8.0.260.0030.00316.87
8.0.250.0030.00716.89
8.0.240.0070.00016.94
8.0.230.0040.00416.93
8.0.220.0000.00716.92
8.0.210.0020.00516.77
8.0.200.0050.00217.00
8.0.190.0030.00316.96
8.0.180.0000.00716.89
8.0.170.0090.00016.94
8.0.160.0040.00416.93
8.0.150.0000.00816.72
8.0.140.0040.00416.89
8.0.130.0000.00513.26
8.0.120.0030.00616.88
8.0.110.0070.00016.79
8.0.100.0000.00816.70
8.0.90.0100.00016.72
8.0.80.0090.00916.95
8.0.70.0030.00416.73
8.0.60.0000.00816.89
8.0.50.0030.00516.70
8.0.30.0070.01417.30
8.0.20.0110.00717.17
8.0.10.0000.00716.89
8.0.00.0140.00516.84
7.4.330.0060.00013.07
7.4.320.0030.00316.50
7.4.300.0030.00316.60
7.4.290.0000.01216.50
7.4.280.0060.00316.59
7.4.270.0030.00616.53
7.4.260.0000.00513.33
7.4.250.0040.00416.55
7.4.240.0030.00316.45
7.4.230.0070.00016.63
7.4.220.0100.01016.49
7.4.210.0070.01416.47
7.4.200.0000.00716.62
7.4.190.0080.00016.65
7.4.160.0070.01016.41
7.4.150.0150.00916.37
7.4.140.0130.01217.86
7.4.130.0150.00916.64
7.4.120.0150.00916.55
7.4.110.0120.00516.39
7.4.100.0060.01116.57
7.4.90.0140.00416.32
7.4.80.0100.00719.39
7.4.70.0080.00816.50
7.4.60.0060.00916.45
7.4.50.0000.00416.43
7.4.40.0150.00316.73
7.4.30.0080.00816.57
7.4.00.0100.00714.64
7.3.330.0030.00313.15
7.3.320.0050.00013.32
7.3.310.0070.00016.19
7.3.300.0060.00016.34
7.3.290.0070.01016.38
7.3.280.0060.00916.47
7.3.270.0070.01016.61
7.3.260.0110.01116.58
7.3.240.0100.00716.41
7.3.230.0030.01316.62
7.3.210.0080.00816.35
7.3.200.0130.00416.58
7.3.190.0150.00316.50
7.3.180.0080.00816.39
7.3.170.0070.01116.50
7.3.160.0140.00716.27
7.3.120.0040.00814.85
7.3.10.0060.00816.68
7.3.00.0030.01216.77
7.2.330.0100.00716.80
7.2.320.0080.01316.68
7.2.310.0170.00316.79
7.2.300.0040.01216.80
7.2.290.0070.01016.52
7.2.130.0070.00717.03
7.2.120.0030.01217.02
7.2.110.0040.01116.78
7.2.100.0070.00716.93
7.2.90.0030.00917.02
7.2.80.0000.01217.08
7.2.70.0060.00817.03
7.2.60.0040.00717.04
7.2.50.0090.00616.90
7.2.40.0090.00616.62
7.2.30.0100.00316.93
7.2.20.0070.00417.04
7.2.10.0030.01017.01
7.2.00.0050.00918.37
7.1.250.0070.00315.69
7.1.200.0060.00915.77
7.1.100.0080.00318.18
7.1.70.0030.00617.27
7.1.60.0100.01319.25
7.1.50.0110.01117.03
7.1.00.0000.03722.44
7.0.200.0000.00816.81
7.0.140.0070.07022.07
7.0.120.0030.06722.25
7.0.60.0070.04319.95
7.0.50.0030.04017.88
7.0.40.0070.03717.75
7.0.30.0030.04017.80
7.0.20.0030.04017.85
7.0.10.0000.04017.75
7.0.00.0030.04017.72
5.6.280.0030.07321.02
5.6.210.0030.04020.75
5.6.200.0100.04018.12
5.6.190.0030.04018.16
5.6.180.0030.04018.18
5.6.170.0130.03018.23
5.6.160.0030.03718.18
5.6.150.0030.04318.16
5.6.140.0030.04018.18
5.6.130.0030.04018.15
5.6.120.0070.03718.24
5.6.110.0000.04318.14
5.6.100.0170.02718.17
5.6.90.0000.04318.23
5.6.80.0070.04017.63
5.6.70.0030.04017.53
5.6.60.0070.06017.66
5.6.50.0070.04717.51
5.6.40.0070.08317.54
5.6.30.0070.07317.54
5.6.20.0070.05017.54
5.6.10.0170.04717.63
5.6.00.0100.07017.57
5.5.350.0270.07020.45
5.5.340.0000.04018.03
5.5.330.0000.04317.93
5.5.320.0000.04317.93
5.5.310.0070.03318.03
5.5.300.0030.03717.97
5.5.290.0000.04317.98
5.5.280.0030.04017.92
5.5.270.0030.04018.07
5.5.260.0000.04317.98
5.5.250.0030.05317.74
5.5.240.0130.06317.34
5.5.230.0000.08017.34
5.5.220.0070.04717.33
5.5.210.0100.07317.40
5.5.200.0070.04317.33
5.5.190.0130.07317.34
5.5.180.0070.07317.40
5.5.160.0030.07717.27
5.5.150.0030.04017.34
5.5.140.0100.06317.43
5.5.130.0000.08317.43
5.5.120.0070.07717.29
5.5.110.0100.07317.34
5.5.100.0100.07317.21
5.5.90.0100.06017.24
5.5.80.0030.05717.23
5.5.70.0130.07017.23
5.5.60.0070.04017.18
5.5.50.0100.07017.25
5.5.40.0030.08317.23
5.5.30.0030.07717.19
5.5.20.0070.08017.21
5.5.10.0030.05317.21
5.5.00.0030.04717.32
5.4.450.0030.03719.29
5.4.440.0030.03719.31
5.4.430.0000.04019.36
5.4.420.0000.04019.43
5.4.410.0000.05719.32
5.4.400.0070.04719.04
5.4.390.0070.04319.13
5.4.380.0130.04319.14
5.4.370.0130.05319.03
5.4.360.0030.05019.13
5.4.350.0030.06319.12
5.4.340.0070.05019.07
5.4.320.0070.07719.05
5.4.310.0030.05719.26
5.4.300.0000.06019.09
5.4.290.0030.08319.02
5.4.280.0170.06719.14
5.4.270.0130.06718.95
5.4.260.0130.07319.03
5.4.250.0030.07019.04
5.4.240.0000.05319.00
5.4.230.0070.04019.09
5.4.220.0070.04319.13
5.4.210.0030.08018.88
5.4.200.0000.07719.01
5.4.190.0100.06319.04
5.4.180.0070.07719.04
5.4.170.0200.07019.02
5.4.160.0100.07018.99
5.4.150.0130.07019.03
5.4.140.0130.04716.30
5.4.130.0130.05316.48
5.4.120.0130.06316.59
5.4.110.0100.06716.55
5.4.100.0030.07716.47
5.4.90.0070.07316.42
5.4.80.0130.07016.56
5.4.70.0170.06716.37
5.4.60.0070.07016.36
5.4.50.0000.07316.52
5.4.40.0100.03016.37
5.4.30.0070.05716.25
5.4.20.0030.06716.51
5.4.10.0000.05016.41
5.4.00.0000.04015.76
5.3.290.0030.04714.73
5.3.280.0030.05014.81
5.3.270.0070.05014.72
5.3.260.0100.05314.56
5.3.250.0030.07314.68
5.3.240.0030.05014.63
5.3.230.0130.07314.63
5.3.220.0100.06714.61
5.3.210.0030.08314.78
5.3.200.0070.06714.63
5.3.190.0070.06714.56
5.3.180.0100.06014.52
5.3.170.0100.06714.63
5.3.160.0070.06714.59
5.3.150.0030.08014.62
5.3.140.0030.06714.60
5.3.130.0070.03314.59
5.3.120.0000.06714.61
5.3.110.0030.07714.54
5.3.100.0030.04713.88
5.3.90.0000.04714.04
5.3.80.0100.07313.91
5.3.70.0030.04014.02
5.3.60.0030.04014.02
5.3.50.0000.04713.98
5.3.40.0170.06714.04
5.3.30.0070.05313.80
5.3.20.0100.07313.91
5.3.10.0070.06313.70
5.3.00.0000.05713.70
5.2.170.0030.04011.37
5.2.160.0030.03311.15
5.2.150.0100.06011.26
5.2.140.0030.06711.16
5.2.130.0000.04011.00
5.2.120.0000.04711.03
5.2.110.0030.03011.13
5.2.100.0030.04010.96
5.2.90.0030.06011.18
5.2.80.0030.06311.14
5.2.70.0000.04711.08
5.2.60.0070.06011.12
5.2.50.0070.06311.04
5.2.40.0070.06011.05
5.2.30.0030.05010.83
5.2.20.0070.03710.97
5.2.10.0070.04310.93
5.2.00.0100.05310.63
5.1.60.0070.04710.07
5.1.50.0030.02310.23
5.1.40.0070.0379.93
5.1.30.0000.04710.39
5.1.20.0030.03710.27
5.1.10.0030.06010.18
5.1.00.0030.05310.13
5.0.50.0030.0478.63
5.0.40.0000.0408.39
5.0.30.0030.0708.23
5.0.20.0070.0408.23
5.0.10.0100.0408.18
5.0.00.0000.0508.24
4.4.90.0070.0337.27
4.4.80.0100.0307.27
4.4.70.0000.0277.27
4.4.60.0000.0307.27
4.4.50.0030.0277.27
4.4.40.0000.0537.27
4.4.30.0070.0307.27
4.4.20.0030.0377.27
4.4.10.0000.0377.27
4.4.00.0100.0477.27
4.3.110.0000.0237.27
4.3.100.0070.0307.27
4.3.90.0030.0377.27
4.3.80.0030.0277.27
4.3.70.0000.0207.27
4.3.60.0030.0377.27
4.3.50.0000.0377.27
4.3.40.0030.0537.27
4.3.30.0000.0337.27
4.3.20.0030.0337.27
4.3.10.0030.0377.27
4.3.00.0000.0337.27

preferences:
50.09 ms | 400 KiB | 5 Q