3v4l.org

run code in 300+ PHP versions simultaneously
<?php function path_relative_to($path, $rel) { $rel_lent = strlen($rel); if (strncmp($path, $rel, strlen($rel)) == 0) { return substr($path, strlen($rel)); } else { return ""; } } var_dump(basename(""));

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.0130.00716.63
8.3.50.0100.01016.48
8.3.40.0070.00718.73
8.3.30.0170.00018.68
8.3.20.0080.00018.60
8.3.10.0040.00420.23
8.3.00.0080.00019.13
8.2.180.0070.00716.63
8.2.170.0210.00022.96
8.2.160.0070.00721.96
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0070.00019.77
8.2.110.0070.00320.94
8.2.100.0080.00317.55
8.2.90.0050.00219.11
8.2.80.0040.00417.77
8.2.70.0040.00417.38
8.2.60.0030.00617.91
8.2.50.0060.00318.07
8.2.40.0030.00618.16
8.2.30.0000.00717.88
8.2.20.0030.00617.63
8.2.10.0000.01017.43
8.2.00.0000.00917.54
8.1.270.0070.01024.66
8.1.260.0070.00726.35
8.1.250.0000.00828.09
8.1.240.0090.00020.79
8.1.230.0040.00720.88
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0040.00417.23
8.1.190.0050.00217.28
8.1.180.0040.00418.10
8.1.170.0000.00818.79
8.1.160.0000.00718.68
8.1.150.0040.00418.51
8.1.140.0070.00017.20
8.1.130.0070.00017.72
8.1.120.0000.00817.35
8.1.110.0050.00217.29
8.1.100.0070.00017.32
8.1.90.0000.00817.37
8.1.80.0040.00317.25
8.1.70.0000.00717.29
8.1.60.0060.00317.49
8.1.50.0000.00917.25
8.1.40.0030.00517.41
8.1.30.0080.00017.49
8.1.20.0050.00317.57
8.1.10.0020.00517.28
8.1.00.0000.00817.31
8.0.300.0040.00419.76
8.0.290.0050.00316.63
8.0.280.0070.00018.23
8.0.270.0030.00317.16
8.0.260.0030.00316.64
8.0.250.0040.00416.81
8.0.240.0000.00716.74
8.0.230.0000.00716.70
8.0.220.0030.00316.75
8.0.210.0050.00216.63
8.0.200.0000.00716.79
8.0.190.0040.00316.77
8.0.180.0000.00716.80
8.0.170.0030.00516.68
8.0.160.0030.00416.78
8.0.150.0050.00316.66
8.0.140.0030.00616.75
8.0.130.0000.00613.19
8.0.120.0080.00016.59
8.0.110.0030.00516.59
8.0.100.0000.00816.75
8.0.90.0050.00216.81
8.0.80.0110.00816.74
8.0.70.0070.00016.82
8.0.60.0050.00216.83
8.0.50.0000.00816.59
8.0.30.0090.01116.87
8.0.20.0150.00816.89
8.0.10.0000.00816.88
8.0.00.0100.01016.76
7.4.330.0060.00012.86
7.4.320.0030.00516.36
7.4.300.0000.00616.37
7.4.290.0040.00416.38
7.4.280.0000.00916.45
7.4.270.0030.00316.46
7.4.260.0000.00513.13
7.4.250.0060.00316.32
7.4.240.0050.00216.48
7.4.230.0030.00316.27
7.4.220.0070.01416.35
7.4.210.0090.00816.51
7.4.200.0050.00216.38
7.4.190.0070.00016.56
7.4.160.0100.00616.34
7.4.150.0090.00916.27
7.4.140.0110.01116.39
7.4.130.0120.00816.41
7.4.120.0080.01016.25
7.4.110.0170.00016.50
7.4.100.0090.00916.25
7.4.90.0030.01416.23
7.4.80.0040.01716.39
7.4.70.0130.00316.34
7.4.60.0100.01016.19
7.4.50.0030.00616.49
7.4.40.0060.00616.38
7.4.30.0170.00016.46
7.4.00.0120.00314.84
7.3.330.0070.00013.18
7.3.320.0030.00313.17
7.3.310.0030.00316.23
7.3.300.0000.00716.09
7.3.290.0000.01416.11
7.3.280.0060.01116.19
7.3.270.0070.01016.17
7.3.260.0110.00916.21
7.3.250.0110.00716.40
7.3.240.0100.00616.51
7.3.230.0130.00316.25
7.3.210.0130.00416.38
7.3.200.0070.01719.39
7.3.190.0110.01416.47
7.3.180.0060.00916.37
7.3.170.0140.00416.18
7.3.160.0030.01316.29
7.3.120.0050.01314.77
7.3.110.0030.01414.82
7.3.100.0070.01014.52
7.3.90.0040.01514.56
7.3.80.0030.00614.64
7.3.70.0070.01014.47
7.3.60.0030.00914.60
7.3.50.0070.00714.45
7.3.40.0110.00314.79
7.3.30.0070.01114.66
7.3.20.0100.00316.54
7.3.10.0110.00316.56
7.3.00.0030.01216.43
7.2.330.0090.00916.25
7.2.320.0110.01116.46
7.2.310.0130.01016.48
7.2.300.0060.01016.56
7.2.290.0070.01016.34
7.2.250.0150.00414.55
7.2.240.0100.01014.79
7.2.230.0130.00014.43
7.2.220.0030.00915.02
7.2.210.0070.00715.05
7.2.200.0090.00614.67
7.2.190.0040.01114.85
7.2.180.0040.01114.77
7.2.170.0090.00314.86
7.2.60.0030.01216.79
7.2.00.0030.01319.28
7.1.330.0070.00715.50
7.1.320.0000.01015.73
7.1.310.0000.01415.65
7.1.300.0040.00415.30
7.1.290.0130.00315.34
7.1.280.0080.00815.57
7.1.270.0070.01015.75
7.1.260.0030.01015.44
7.1.200.0080.01215.32
7.1.100.0070.01017.75
7.1.70.0000.01016.73
7.1.60.0190.00619.40
7.1.50.0060.01516.90
7.1.00.0130.05722.51
7.0.200.0040.00416.48
7.0.140.0130.06322.18
7.0.120.0100.06322.15
7.0.60.0130.07319.94
7.0.50.0030.05317.87
7.0.40.0000.09320.15
7.0.30.0270.06020.23
7.0.20.0400.07720.09
7.0.10.0230.04720.08
7.0.00.0030.09720.05
5.6.280.0000.05020.93
5.6.210.0070.04720.65
5.6.200.0030.08718.15
5.6.190.0070.06720.32
5.6.180.0330.06320.79
5.6.170.0230.04320.47
5.6.160.0000.04720.46
5.6.150.0070.03718.14
5.6.140.0030.07718.33
5.6.130.0170.06018.28
5.6.120.0000.06321.02
5.6.110.0070.08721.01
5.6.100.0070.07721.14
5.6.90.0070.06021.04
5.6.80.0170.07720.43
5.6.70.3870.04320.54
5.5.350.0370.06020.47
5.5.340.0070.08317.95
5.5.330.0070.03720.26
5.5.320.0230.08020.37
5.5.310.0270.03720.30
5.5.300.0070.06317.96
5.5.290.0100.03717.95
5.5.280.0030.05020.96
5.5.270.0070.04320.87
5.5.260.0100.04020.96
5.5.250.0100.06720.69
5.5.240.0130.07020.26
5.4.450.0070.08019.57
5.4.440.0300.02719.33
5.4.430.0170.07019.47
5.4.420.0030.04719.52
5.4.410.0100.07319.05
5.4.400.0100.05719.01
5.4.390.0030.06018.87
5.4.380.0030.05719.15
5.4.370.0030.04318.96
5.4.360.0030.05719.18
5.4.350.0130.03719.08
5.4.340.0070.08019.14
5.4.320.0130.05318.92
5.4.310.0100.07718.85
5.4.300.0030.07319.14
5.4.290.0030.04719.23
5.4.280.0030.04019.11
5.4.270.0000.04319.00
5.4.260.0030.04019.11
5.4.250.0100.06319.07
5.4.240.0130.06718.84
5.4.230.0100.07319.14
5.4.220.0070.04019.23
5.4.210.0130.02718.84
5.4.200.0100.04019.00
5.4.190.0000.04318.84
5.4.180.0130.07019.07
5.4.170.0130.06018.84
5.4.160.0030.04018.85
5.4.150.0100.05318.86
5.4.140.0070.04316.43
5.4.130.0030.07016.37
5.4.120.0100.06316.30
5.4.110.0000.04016.39
5.4.100.0030.03716.39
5.4.90.0000.03716.30
5.4.80.0030.03316.45
5.4.70.0030.03716.29
5.4.60.0000.03716.40
5.4.50.0070.03316.29
5.4.40.0000.03716.50
5.4.30.0070.03316.38
5.4.20.0000.03716.46
5.4.10.0070.03016.31
5.4.00.0030.03315.99
5.3.290.0070.07714.73
5.3.280.0200.04014.75
5.3.270.0000.04014.61
5.3.260.0200.03014.65
5.3.250.0100.07014.75
5.3.240.0100.03314.61
5.3.230.0070.05314.75
5.3.220.0100.03714.49
5.3.210.0070.04014.56
5.3.200.0070.03314.63
5.3.190.0000.04314.59
5.3.180.0030.03714.58
5.3.170.0000.04014.59
5.3.160.0100.03014.57
5.3.150.0000.04314.45
5.3.140.0000.04014.59
5.3.130.0070.03714.59
5.3.120.0000.04014.61
5.3.110.0030.03714.59
5.3.100.0030.03714.09
5.3.90.0000.03714.18
5.3.80.0000.04014.00
5.3.70.0030.03314.06
5.3.60.0070.03714.17
5.3.50.0000.03713.87
5.3.40.0000.03713.89
5.3.30.0100.02713.95
5.3.20.0030.03313.71
5.3.10.0030.03713.66
5.3.00.0130.05313.58
5.2.170.0000.03011.29
5.2.160.0000.03011.30
5.2.150.0030.02711.11
5.2.140.0030.02711.19
5.2.130.0030.02711.09
5.2.120.0070.02311.15
5.2.110.0030.02711.02
5.2.100.0030.02711.16
5.2.90.0070.02311.09
5.2.80.0000.03311.08
5.2.70.0000.03311.18
5.2.60.0000.03311.12
5.2.50.0000.03011.01
5.2.40.0070.02311.01
5.2.30.0070.02311.02
5.2.20.0000.03011.11
5.2.10.0000.03010.82
5.2.00.0070.02310.78
5.1.60.0030.02010.14
5.1.50.0070.0209.98
5.1.40.0100.0179.94
5.1.30.0030.02310.30
5.1.20.0030.02310.23
5.1.10.0030.03310.11
5.1.00.0070.03010.06
5.0.50.0030.0479.71
5.0.40.0000.0479.71
5.0.30.0000.0339.71
5.0.20.0030.0239.71
5.0.10.0130.0239.71
5.0.00.0100.0509.71
4.4.90.0000.0139.71
4.4.80.0000.0239.71
4.4.70.0000.0179.71
4.4.60.0030.0139.71
4.4.50.0000.0139.71
4.4.40.0070.0209.71
4.4.30.0030.0139.71
4.4.20.0030.0139.71
4.4.10.0000.0179.71
4.4.00.0000.0379.71
4.3.110.0000.0209.71
4.3.100.0000.0409.71
4.3.90.0030.0309.71
4.3.80.0000.0339.71
4.3.70.0000.0339.71
4.3.60.0000.0309.71
4.3.50.0070.0279.71
4.3.40.0000.0579.71
4.3.30.0070.0239.71
4.3.20.0070.0339.71
4.3.10.0030.0279.71
4.3.00.0000.0239.71

preferences:
58.23 ms | 400 KiB | 5 Q