3v4l.org

run code in 300+ PHP versions simultaneously
<?php // In response to http://www.php.net/manual/en/language.constants.predefined.php#113130 // In fact, you can define magic constants too. if (@__DIR__ == '__DIR__') { echo "magic __DIR__ constant NOT defined\r\n"; echo "defining __DIR__ constant\r\n"; define('__DIR__', substr(__FILE__, 0, strrpos(__FILE__, DIRECTORY_SEPARATOR))); } else { echo "magic __DIR__ constant IS defined\r\n"; } echo "result of var_dump(__DIR__):\r\n"; var_dump(__DIR__);

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.0110.00716.75
8.3.50.0120.00722.12
8.3.40.0110.00318.89
8.3.30.0000.01419.00
8.3.20.0000.00820.34
8.3.10.0090.00023.61
8.3.00.0030.00619.38
8.2.180.0110.00716.38
8.2.170.0090.00622.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0120.00326.16
8.2.120.0070.00022.10
8.2.110.0030.00622.07
8.2.100.0000.01217.72
8.2.90.0060.00319.05
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0040.00418.04
8.2.50.0040.00419.23
8.2.40.0030.00618.09
8.2.30.0000.00718.05
8.2.20.0040.00417.61
8.2.10.0050.00217.91
8.2.00.0000.00717.69
8.1.280.0140.00725.92
8.1.270.0100.00722.14
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0050.00523.92
8.1.230.0040.00722.20
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0040.00417.54
8.1.180.0000.00918.10
8.1.170.0060.00618.50
8.1.160.0040.00422.04
8.1.150.0000.00818.52
8.1.140.0040.00417.43
8.1.130.0000.00717.72
8.1.120.0040.00417.44
8.1.110.0040.00417.29
8.1.100.0060.00317.36
8.1.90.0080.00017.28
8.1.80.0080.00017.21
8.1.70.0030.00317.23
8.1.60.0070.00417.54
8.1.50.0070.00017.29
8.1.40.0080.00017.48
8.1.30.0000.00817.52
8.1.20.0000.00817.54
8.1.10.0080.00017.34
8.1.00.0040.00417.22
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0030.00318.39
8.0.270.0000.00717.09
8.0.260.0030.00316.86
8.0.250.0000.00616.95
8.0.240.0000.00816.85
8.0.230.0000.00816.81
8.0.220.0030.00316.78
8.0.210.0000.00716.88
8.0.200.0000.00716.84
8.0.190.0040.00416.93
8.0.180.0000.00716.95
8.0.170.0060.00316.80
8.0.160.0000.00716.91
8.0.150.0000.00716.80
8.0.140.0030.00316.74
8.0.130.0050.00013.35
8.0.120.0000.00816.74
8.0.110.0070.00016.80
8.0.100.0040.00416.88
8.0.90.0000.00716.93
8.0.80.0130.00316.91
8.0.70.0060.00316.77
8.0.60.0030.00616.77
8.0.50.0000.00816.74
8.0.30.0090.01117.04
8.0.20.0140.00517.40
8.0.10.0050.00316.88
8.0.00.0120.01016.84
7.4.330.0020.00215.00
7.4.320.0030.00316.33
7.4.300.0030.00316.52
7.4.290.0000.00716.52
7.4.280.0070.00016.56
7.4.270.0050.00316.52
7.4.260.0060.00016.27
7.4.250.0000.00716.50
7.4.240.0030.00316.43
7.4.230.0030.00316.54
7.4.220.0130.00316.37
7.4.210.0060.00816.51
7.4.200.0000.00716.33
7.4.190.0040.00416.68
7.4.160.0100.00616.36
7.4.150.0100.00717.40
7.4.140.0110.00917.86
7.4.130.0050.01116.35
7.4.120.0100.01016.49
7.4.110.0110.00816.32
7.4.100.0100.01316.37
7.4.90.0180.00016.42
7.4.80.0090.01319.39
7.4.70.0130.01016.59
7.4.60.0060.01016.37
7.4.50.0050.00316.25
7.4.40.0030.01222.77
7.4.30.0060.00916.52
7.4.00.0130.00314.66
7.3.330.0000.00513.11
7.3.320.0050.00013.17
7.3.310.0000.00716.05
7.3.300.0000.00716.18
7.3.290.0120.00316.24
7.3.280.0090.01016.21
7.3.270.0160.00317.40
7.3.260.0100.01316.32
7.3.250.0130.00516.34
7.3.240.0070.01016.20
7.3.230.0070.01416.39
7.3.210.0030.01316.37
7.3.200.0090.00919.39
7.3.190.0070.01316.18
7.3.180.0090.00616.24
7.3.170.0030.01316.34
7.3.160.0090.00616.38
7.3.120.0040.01115.02
7.2.330.0050.01416.26
7.2.320.0070.01016.61
7.2.310.0070.01016.54
7.2.300.0080.00816.56
7.2.290.0090.01116.54
7.1.70.0000.00717.05
7.1.60.0060.01319.33
7.1.50.0110.01116.86
7.1.00.0130.06722.43
7.0.200.0000.00716.68
7.0.140.0030.07322.11
7.0.60.0070.04020.00
7.0.50.0030.08717.88
7.0.40.0070.09019.98
7.0.30.0400.07320.02
7.0.20.0230.05320.30
7.0.10.0070.04720.16
7.0.00.0070.09020.16
5.6.280.0030.07321.15
5.6.210.0030.04020.64
5.6.200.0070.04318.12
5.6.190.0000.04720.61
5.6.180.3900.04020.41
5.6.170.0370.07020.48
5.6.160.0070.05320.48
5.6.150.0130.07318.22
5.6.140.0070.04018.17
5.6.130.0030.06718.20
5.6.120.0070.08720.83
5.6.110.0030.07321.09
5.6.100.0030.06321.11
5.6.90.0100.05021.10
5.6.80.0030.05720.37
5.5.350.0230.05720.38
5.5.340.0100.06717.98
5.5.330.0070.03720.29
5.5.320.0300.08020.20
5.5.310.0330.07320.27
5.5.300.0130.08017.91
5.5.290.0070.04317.87
5.5.280.0070.08020.97
5.5.270.0070.05720.75
5.5.260.0100.08020.62
5.5.250.0130.07020.54
5.5.240.0230.07320.28
5.4.450.4030.03719.47
5.4.440.0200.07019.21
5.4.430.1230.04319.40
5.4.420.3270.03719.32
5.4.410.3330.03719.20
5.4.400.3300.03719.06
5.4.390.3700.04019.12
5.4.380.3970.04019.15
5.4.370.4500.03719.09
5.4.360.4200.04019.18
5.4.350.3730.04018.88
5.4.340.4230.04019.24
5.4.320.4070.04319.14
5.4.310.3700.03319.03
5.4.300.4700.03019.04
5.4.290.4600.03019.14
5.4.280.4500.04019.23
5.4.270.4800.04018.92
5.4.260.4130.03319.14
5.4.250.4470.04019.23
5.4.240.3330.03319.01
5.4.230.3530.03019.07
5.4.220.0100.04319.12
5.4.210.0500.05019.16
5.4.200.4630.03019.13
5.4.190.4300.04019.12
5.4.180.4370.04019.13
5.4.170.4100.04319.13
5.4.160.4000.05019.10
5.4.150.3830.03319.06
5.4.140.3430.04016.34
5.4.130.3830.03316.16
5.4.120.0070.07016.44
5.4.110.3770.03716.32
5.4.100.4170.03316.35
5.4.90.4170.02716.49
5.4.80.4630.03316.40
5.4.70.4600.03316.40
5.4.60.4670.03316.34
5.4.50.4530.03316.39
5.4.40.4230.03716.44
5.4.30.4330.04016.13
5.4.20.4500.03716.32
5.4.10.4600.03716.20
5.4.00.4570.03315.89
5.3.290.3700.03714.48
5.3.280.1700.04014.38
5.3.270.4600.04014.48
5.3.260.4070.04714.39
5.3.250.3830.04014.55
5.3.240.3470.04014.54
5.3.230.2500.04314.53
5.3.220.0070.07014.49
5.3.210.0100.06714.57
5.3.200.3700.03714.40
5.3.190.4370.03714.50
5.3.180.3770.04014.48
5.3.170.4170.04314.53
5.3.160.4600.04014.48
5.3.150.4600.03714.64
5.3.140.4570.03714.48
5.3.130.4570.03014.52
5.3.120.4500.04014.50
5.3.110.4670.03314.52
5.3.100.4670.03014.14
5.3.90.4300.03313.98
5.3.80.3770.04313.95
5.3.70.5130.03713.98
5.3.60.4630.03013.84
5.3.50.4530.03313.78
5.3.40.3970.03013.92
5.3.30.4070.03713.85
5.3.20.4230.03713.63
5.3.10.3930.03713.67
5.3.00.4100.03713.65
5.2.170.3800.03311.11
5.2.160.3800.03311.07
5.2.150.3370.02311.11
5.2.140.2900.03311.04
5.2.130.2870.02711.09
5.2.120.3130.02311.11
5.2.110.3270.03011.03
5.2.100.3270.03311.25
5.2.90.2770.02011.07
5.2.80.2930.03011.12
5.2.70.3070.03010.95
5.2.60.3730.03010.90
5.2.50.3070.02311.17
5.2.40.2400.02310.82
5.2.30.2800.03010.90
5.2.20.2570.03310.86
5.2.10.1870.02310.86
5.2.00.2270.03010.75
5.1.60.1770.0279.89
5.1.50.1900.03010.06
5.1.40.2070.0239.95
5.1.30.2000.02310.38
5.1.20.1930.02010.39
5.1.10.1930.03010.11
5.1.00.2130.03010.06
5.0.50.1200.0208.61
5.0.40.1330.0238.40
5.0.30.1300.0308.27
5.0.20.1330.0178.19
5.0.10.1470.0178.18
5.0.00.1230.0338.15
4.4.90.1230.0135.90
4.4.80.1200.0135.90
4.4.70.0930.0135.92
4.4.60.1130.0135.93
4.4.50.1100.0075.93
4.4.40.0800.0275.94
4.4.30.0870.0105.95
4.4.20.1100.0175.96
4.4.10.1170.0175.96
4.4.00.1530.0305.96
4.3.110.1330.0175.96
4.3.100.1600.0135.96
4.3.90.1270.0135.96
4.3.80.1200.0275.96
4.3.70.1170.0175.96
4.3.60.1170.0175.96
4.3.50.1530.0105.96
4.3.40.1130.0275.96
4.3.30.0600.0205.96
4.3.20.1100.0175.96
4.3.10.0870.0175.96
4.3.00.0930.0235.96

preferences:
61.5 ms | 401 KiB | 5 Q