3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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 "r\nresult 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.0060.01218.56
8.3.50.0140.00621.92
8.3.40.0120.00318.54
8.3.30.0140.00019.09
8.3.20.0040.00420.30
8.3.10.0030.00621.96
8.3.00.0030.00722.32
8.2.180.0090.00916.73
8.2.170.0090.00622.96
8.2.160.0100.00320.89
8.2.150.0050.00224.18
8.2.140.0030.00524.66
8.2.130.0070.01026.16
8.2.120.0040.00417.50
8.2.110.0060.00322.12
8.2.100.0120.00017.66
8.2.90.0000.00719.09
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0040.00418.04
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0050.00318.11
8.2.20.0070.00017.56
8.2.10.0040.00419.52
8.2.00.0040.00417.62
8.1.280.0120.00325.92
8.1.270.0060.00322.01
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0090.00023.82
8.1.230.0110.00019.10
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0030.00717.40
8.1.180.0000.00818.10
8.1.170.0030.00618.64
8.1.160.0040.00422.01
8.1.150.0040.00418.51
8.1.140.0040.00417.32
8.1.130.0070.00017.70
8.1.120.0060.00317.29
8.1.110.0080.00017.38
8.1.100.0000.00717.45
8.1.90.0080.00017.20
8.1.80.0050.00217.27
8.1.70.0000.00817.38
8.1.60.0000.00717.38
8.1.50.0040.00417.34
8.1.40.0000.00817.35
8.1.30.0000.00817.41
8.1.20.0030.00517.64
8.1.10.0050.00217.38
8.1.00.0000.00717.32
8.0.300.0070.00018.77
8.0.290.0080.00017.04
8.0.280.0000.00718.30
8.0.270.0000.00717.15
8.0.260.0000.00816.82
8.0.250.0000.00716.96
8.0.240.0000.00716.87
8.0.230.0030.00316.96
8.0.220.0040.00416.89
8.0.210.0000.00616.89
8.0.200.0030.00316.91
8.0.190.0030.00516.97
8.0.180.0050.00316.93
8.0.170.0000.00816.84
8.0.160.0000.00716.84
8.0.150.0030.00316.87
8.0.140.0050.00216.75
8.0.130.0030.00313.25
8.0.120.0000.00716.74
8.0.110.0050.00316.88
8.0.100.0040.00416.83
8.0.90.0050.00216.89
8.0.80.0130.00316.91
8.0.70.0040.00416.78
8.0.60.0050.00316.84
8.0.50.0000.00716.80
8.0.30.0100.01017.16
8.0.20.0140.00717.40
8.0.10.0000.00716.83
8.0.00.0170.00316.83
7.4.330.0000.00515.03
7.4.320.0030.00316.51
7.4.300.0030.00516.35
7.4.290.0000.00616.42
7.4.280.0000.00716.45
7.4.270.0000.00816.43
7.4.260.0030.00316.49
7.4.250.0000.00816.54
7.4.240.0020.00516.46
7.4.230.0000.00716.64
7.4.220.0070.01116.61
7.4.210.0070.00916.45
7.4.200.0000.00716.63
7.4.190.0030.00316.25
7.4.160.0100.01016.52
7.4.150.0090.00917.40
7.4.140.0080.01017.86
7.4.130.0070.01416.45
7.4.120.0130.00516.40
7.4.110.0130.00316.38
7.4.100.0070.01016.40
7.4.90.0070.01016.37
7.4.80.0100.00719.39
7.4.70.0090.00616.39
7.4.60.0080.01116.54
7.4.50.0030.00616.35
7.4.40.0070.00722.77
7.4.30.0100.00716.45
7.4.00.0120.00314.89
7.3.330.0000.00513.09
7.3.320.0030.00313.11
7.3.310.0050.00216.27
7.3.300.0040.00416.22
7.3.290.0000.01416.24
7.3.280.0090.01116.21
7.3.270.0140.00317.40
7.3.260.0120.00616.26
7.3.250.0130.00716.16
7.3.240.0100.00616.15
7.3.230.0140.00316.39
7.3.210.0130.00716.38
7.3.200.0090.01219.39
7.3.190.0040.01316.45
7.3.180.0150.00016.20
7.3.170.0070.01016.48
7.3.160.0100.00716.20
7.3.120.0030.00914.52
7.2.330.0100.00716.65
7.2.320.0160.00316.66
7.2.310.0070.01116.56
7.2.300.0000.01716.49
7.2.290.0120.00916.61
7.2.00.0030.01319.40
7.1.70.0060.00616.89
7.1.60.0060.00616.87
7.1.50.0230.01634.75
7.1.00.0030.07722.51
7.0.200.0000.01416.70
7.0.140.0030.07022.23
7.0.60.0070.07319.88
7.0.50.0070.03717.91
7.0.40.0030.04720.25
7.0.30.0200.07720.04
7.0.20.0330.04720.09
7.0.10.0270.08320.13
7.0.00.0000.07720.18
5.6.280.0070.07021.02
5.6.210.0070.05020.76
5.6.200.0070.07718.19
5.6.190.0030.08020.39
5.6.180.3630.03720.33
5.6.170.0270.03320.38
5.6.160.0100.08020.48
5.6.150.0030.08318.20
5.6.140.0070.05318.20
5.6.130.0100.04318.18
5.6.120.0100.04021.11
5.6.110.0030.04021.04
5.6.100.0070.07720.98
5.6.90.0200.07720.97
5.6.80.0070.08320.37
5.5.350.0000.08020.46
5.5.340.0070.06017.98
5.5.330.0100.03720.38
5.5.320.0300.07020.18
5.5.310.0200.05720.31
5.5.300.0000.04718.02
5.5.290.0030.06017.87
5.5.280.0070.04020.88
5.5.270.0130.07720.89
5.5.260.0000.06720.67
5.5.250.0030.07020.79
5.5.240.0130.03020.11
5.4.450.0400.05019.60
5.4.440.0500.05019.14
5.4.430.0530.04719.58
5.4.420.0100.05319.27
5.4.410.0170.05019.00
5.4.400.0130.04718.63
5.4.390.0200.05018.53
5.4.380.0370.07018.58
5.4.370.0030.06018.66
5.4.360.0300.04018.73
5.4.350.0230.04718.46
5.4.340.0100.05318.48
5.4.320.0040.04112.46
5.4.310.0050.04012.45
5.4.300.0050.03812.46
5.4.290.0080.03612.45
5.4.280.0050.03612.35
5.4.270.0080.03512.35
5.4.260.0060.03812.35
5.4.250.0060.03712.35
5.4.240.0060.04012.35
5.4.230.0040.04012.34
5.4.220.0060.03512.34
5.4.210.0040.03612.34
5.4.200.0070.03712.34
5.4.190.0230.06319.00
5.4.180.0130.07019.06
5.4.170.0000.06318.86
5.4.160.0170.04719.05
5.4.150.0100.06318.91
5.4.140.0000.06016.60
5.4.130.0130.06016.58
5.4.120.0100.04716.45
5.4.110.0130.05716.35
5.4.100.0070.07016.58
5.4.90.0230.03316.34
5.4.80.0000.06016.42
5.4.70.0070.05016.34
5.4.60.0130.06016.27
5.4.50.0070.07316.52
5.4.40.0070.05316.54
5.4.30.0100.05716.52
5.4.20.0130.06716.57
5.4.10.0170.04016.36
5.4.00.0030.05715.83
5.3.290.0060.04112.80
5.3.280.0090.03612.71
5.3.270.0070.06014.75
5.3.260.0030.07014.59
5.3.250.0100.05314.75
5.3.240.0170.05714.55
5.3.230.0100.05014.68
5.3.220.0100.06314.60
5.3.210.0070.06014.70
5.3.200.0100.06014.71
5.3.190.0070.05314.71
5.3.180.0070.05314.73
5.3.170.0070.07314.60
5.3.160.0170.04714.64
5.3.150.0100.05014.65
5.3.140.0070.05714.51
5.3.130.0000.08014.63
5.3.120.0070.05714.54
5.3.110.0100.06714.74
5.3.100.0100.04714.19
5.3.90.0100.07714.14
5.3.80.0030.05314.21
5.3.70.0030.06714.00
5.3.60.0070.05314.19
5.3.50.0100.05013.93
5.3.40.0100.05013.93
5.3.30.0170.05713.99
5.3.20.0070.06713.68
5.3.10.0100.06713.64
5.3.00.0070.06313.75
5.2.170.0030.05011.38
5.2.160.0130.04710.93
5.2.150.0000.05011.38
5.2.140.0070.04010.95
5.2.130.0070.04711.15
5.2.120.0000.05311.23
5.2.110.0070.04011.25
5.2.100.0030.04311.29
5.2.90.0130.04311.32
5.2.80.0100.04011.31
5.2.70.0100.04011.21
5.2.60.0130.05011.26
5.2.50.0030.05710.83
5.2.40.0100.03710.92
5.2.30.0070.05711.11
5.2.20.0130.04311.06
5.2.10.0030.04311.03
5.2.00.0030.04310.94
5.1.60.0000.05310.25
5.1.50.0070.04710.19
5.1.40.0070.03310.29
5.1.30.0130.04710.54
5.1.20.0100.04310.34
5.1.10.0130.04010.35
5.1.00.0130.04310.04
5.0.50.0030.0379.69
5.0.40.0030.0309.69
5.0.30.0030.0439.69
5.0.20.0030.0339.69
5.0.10.0130.0239.69
5.0.00.0000.0539.69
4.4.90.0130.0209.69
4.4.80.0070.0239.69
4.4.70.0030.0309.69
4.4.60.0000.0279.69
4.4.50.0100.0209.69
4.4.40.0100.0309.69
4.4.30.0000.0279.69
4.4.20.0030.0209.69
4.4.10.0070.0279.69
4.4.00.0000.0409.69
4.3.110.0030.0309.69
4.3.100.0000.0239.69
4.3.90.0070.0179.69
4.3.80.0000.0439.69
4.3.70.0030.0309.69
4.3.60.0000.0339.69
4.3.50.0000.0339.69
4.3.40.0030.0409.69
4.3.30.0000.0279.69
4.3.20.0030.0279.69
4.3.10.0030.0209.69
4.3.00.0200.0206.36

preferences:
51.32 ms | 401 KiB | 5 Q