3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); echo 'Here is __DIR__ to start: ' . "\n"; var_dump(__DIR__); echo "\n\n"; echo 'Checking if __DIR__ is defined...' . "\n"; if (!defined('__DIR__')) { echo 'Nope, defined() returned (bool)false.' . "\n"; echo 'No prob. Executing define(\'__DIR__\', \'/foo/bar\')...' . "\n"; define('__DIR__', '/foo/bar'); echo 'Done, defined __DIR__ as "/foo/bar".' . "\n" . "\n"; echo 'Double-checking __DIR__ is defined now...' . "\n"; if (!defined('__DIR__')) { echo 'WTF, defined(\'__DIR__\') again returned (bool)false?!' . "\n"; } else{ echo 'Strike, this time defined(\'__DIR__\') returned (bool)true.' . "\n"; } } else{ echo 'Yep, defined(\'__DIR__\') returned (bool)true.' . "\n"; } echo 'Finally, here is the result of var_dump(__DIR__):' . "\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.0140.00318.43
8.3.50.0240.00521.27
8.3.40.0150.00018.82
8.3.30.0070.00720.35
8.3.20.0040.00418.65
8.3.10.0080.00021.10
8.3.00.0040.00423.70
8.2.180.0090.00916.63
8.2.170.0090.00622.96
8.2.160.0180.00020.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.62
8.2.110.0060.00319.32
8.2.100.0060.00617.70
8.2.90.0000.00718.98
8.2.80.0000.00719.41
8.2.70.0060.00317.50
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0030.00518.22
8.2.30.0040.00819.35
8.2.20.0040.00417.71
8.2.10.0030.00517.56
8.2.00.0070.00217.68
8.1.280.0110.00725.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00822.41
8.1.230.0060.00620.93
8.1.220.0040.00418.77
8.1.210.0050.00319.02
8.1.200.0090.00017.22
8.1.190.0050.00317.51
8.1.180.0090.00018.10
8.1.170.0040.00418.64
8.1.160.0040.00418.89
8.1.150.0030.00518.65
8.1.140.0060.00317.32
8.1.130.0030.00317.84
8.1.120.0000.00717.44
8.1.110.0040.00317.29
8.1.100.0040.00417.33
8.1.90.0000.00717.27
8.1.80.0050.00317.40
8.1.70.0030.00317.38
8.1.60.0030.00617.55
8.1.50.0070.00017.41
8.1.40.0050.00317.37
8.1.30.0000.00817.63
8.1.20.0040.00417.55
8.1.10.0040.00417.46
8.1.00.0030.00517.36
8.0.300.0060.00319.97
8.0.290.0000.00717.05
8.0.280.0030.00318.39
8.0.270.0070.00017.22
8.0.260.0030.00316.81
8.0.250.0000.00816.86
8.0.240.0080.00016.95
8.0.230.0040.00416.95
8.0.220.0030.00316.83
8.0.210.0030.00616.90
8.0.200.0080.00016.80
8.0.190.0040.00416.95
8.0.180.0070.00016.91
8.0.170.0000.00716.76
8.0.160.0030.00316.81
8.0.150.0040.00316.76
8.0.140.0040.00416.86
8.0.130.0000.00613.26
8.0.120.0040.00416.75
8.0.110.0070.00016.72
8.0.100.0000.00716.85
8.0.90.0040.00416.91
8.0.80.0090.00616.82
8.0.70.0040.00416.63
8.0.60.0040.00416.80
8.0.50.0000.00716.73
8.0.30.0070.01316.95
8.0.20.0130.00717.40
8.0.10.0070.00017.03
8.0.00.0100.01116.80
7.4.330.0050.00016.81
7.4.320.0070.00016.37
7.4.300.0060.00016.53
7.4.290.0000.00916.52
7.4.280.0060.00016.30
7.4.270.0030.00316.57
7.4.260.0030.00313.23
7.4.250.0070.00016.35
7.4.240.0000.00716.48
7.4.230.0000.00716.66
7.4.220.0070.01616.54
7.4.210.0070.00716.37
7.4.200.0040.00416.29
7.4.190.0040.00416.53
7.4.160.0130.00316.26
7.4.150.0110.01117.40
7.4.140.0110.00617.86
7.4.130.0070.01116.40
7.4.120.0130.00816.47
7.4.110.0150.01116.62
7.4.100.0110.00716.52
7.4.90.0130.00316.31
7.4.80.0090.00919.39
7.4.70.0070.01416.37
7.4.60.0170.00016.32
7.4.50.0060.00316.20
7.4.40.0070.01022.77
7.4.30.0180.00416.57
7.4.00.0100.00615.02
7.3.330.0050.00013.00
7.3.320.0040.00413.04
7.3.310.0030.00316.27
7.3.300.0040.00416.04
7.3.290.0100.00316.10
7.3.280.0050.01116.11
7.3.270.0070.01217.40
7.3.260.0150.00818.24
7.3.250.0160.00316.17
7.3.240.0030.01316.14
7.3.230.0100.00616.39
7.3.210.0120.00416.26
7.3.200.0150.00719.39
7.3.190.0120.00916.38
7.3.180.0160.00016.32
7.3.170.0070.01316.38
7.3.160.0060.01216.40
7.3.120.0000.00814.95
7.2.330.0060.01216.50
7.2.320.0110.00616.31
7.2.310.0130.00516.61
7.2.300.0100.00616.61
7.2.290.0080.00816.26
7.2.60.0040.00416.79
7.1.200.0050.00315.65
7.1.70.0000.01017.06
7.1.60.0130.01319.17
7.1.50.0000.01916.65
7.1.00.0070.03722.31
7.0.200.0040.00416.73
7.0.140.0000.07722.21
7.0.100.0200.08320.02
7.0.90.0230.06719.95
7.0.80.0070.04719.93
7.0.70.0070.08319.89
7.0.60.0070.04019.93
7.0.50.0070.06320.25
7.0.40.0100.08020.18
7.0.30.0030.07020.12
7.0.20.0000.07320.10
7.0.10.0170.03320.07
7.0.00.0030.04720.12
5.6.280.0030.07321.14
5.6.250.0070.08720.59
5.6.240.0070.08020.63
5.6.230.0070.08320.50
5.6.220.0130.08320.61
5.6.210.0070.06320.66
5.6.200.0100.07321.06
5.6.190.0000.04721.03
5.6.180.0000.07321.13
5.6.170.0030.04721.04
5.6.160.0200.06321.02
5.6.150.0070.03721.04
5.6.140.0100.03721.07
5.6.130.0030.09320.93
5.6.120.0070.05020.93
5.6.110.0070.04720.99
5.6.100.0130.07021.02
5.6.90.0130.07020.98
5.6.80.0100.06720.33
5.6.70.0130.07020.42
5.6.60.0070.04020.39
5.6.50.0230.06320.48
5.6.40.0130.07020.52
5.6.30.0130.07020.40
5.6.20.0070.05320.41
5.6.10.0100.07720.52
5.6.00.0030.04020.39
5.5.380.0070.07720.34
5.5.370.0070.04720.45
5.5.360.0070.07020.48
5.5.350.0030.04320.45
5.5.340.0100.03720.84
5.5.330.0000.05020.85
5.5.320.0170.08020.89
5.5.310.0070.06020.73
5.5.300.0070.05720.83
5.5.290.0070.09020.88
5.5.280.0100.07720.76
5.5.270.0030.04020.82
5.5.260.0100.08020.63
5.5.250.0170.07020.43
5.5.240.0030.06320.28
5.5.230.0070.06720.30
5.5.220.0100.06320.30
5.5.210.0070.07320.16
5.5.200.0130.06720.27
5.5.190.0030.06720.27
5.5.180.0030.04020.21
5.5.160.0030.08320.28
5.5.150.0070.06320.25
5.5.140.0030.08320.27
5.5.130.0070.07720.27
5.5.120.0130.07320.18
5.5.110.0030.07020.25
5.5.100.0000.08320.18
5.5.90.0070.08320.09
5.5.80.0070.03320.14
5.5.70.0130.04020.04
5.5.60.0030.06720.05
5.5.50.0000.04720.03
5.5.40.0130.07320.14
5.5.30.0030.08020.05
5.5.20.0100.07320.14
5.5.10.0070.04720.08
5.5.00.0100.07719.96
5.4.450.0030.07719.48
5.4.440.0070.05319.51
5.4.430.0070.07019.44
5.4.420.0000.06319.42
5.4.410.0030.07719.17
5.4.400.0030.08018.97
5.4.390.0100.07319.07
5.4.380.0000.04719.23
5.4.370.0070.07718.96
5.4.360.0070.05319.03
5.4.350.0070.07019.03
5.4.340.0100.05719.07
5.4.320.0100.06018.79
5.4.310.0070.07719.10
5.4.300.0000.08018.96
5.4.290.0000.08319.07
5.4.280.0030.06719.04
5.4.270.0100.07718.78
5.4.260.0100.03318.98
5.4.250.0100.07018.89
5.4.240.0070.08019.07
5.4.230.0130.05719.14
5.4.220.0170.06718.89
5.4.210.0100.07319.12
5.4.200.0070.06319.11
5.4.190.0070.08019.06
5.4.180.0030.07318.77
5.4.170.0070.08019.11
5.4.160.0130.07019.09
5.4.150.0130.06318.81
5.4.140.0100.07316.06
5.4.130.0070.06716.36
5.4.120.0000.07316.34
5.4.110.0070.05716.20
5.4.100.0100.07716.32
5.4.90.0070.07316.21
5.4.80.0000.07716.31
5.4.70.0100.04016.29
5.4.60.0100.05316.18
5.4.50.0030.05316.38
5.4.40.0070.05016.29
5.4.30.0100.03316.40
5.4.20.0030.03716.23
5.4.10.0070.03316.29
5.4.00.0070.03715.81
5.3.290.0100.04014.60
5.3.280.0030.08314.53
5.3.270.0130.06714.59
5.3.260.0100.04314.52
5.3.250.0100.07314.59
5.3.240.0030.07714.58
5.3.230.0030.07714.55
5.3.220.0070.04314.55
5.3.210.0130.07314.52
5.3.200.0070.07314.50
5.3.190.0030.07314.55
5.3.180.0100.04014.52
5.3.170.0030.07714.57
5.3.160.0070.04014.41
5.3.150.0100.04014.55
5.3.140.0030.04014.48
5.3.130.0070.03714.40
5.3.120.0170.03314.52
5.3.110.0030.03714.40
5.3.100.0030.03314.02
5.3.90.0000.04013.97
5.3.80.0070.03313.96
5.3.70.0000.04013.92
5.3.60.0030.04013.99
5.3.50.0030.03313.93
5.3.40.0030.04013.92
5.3.30.0000.03713.82
5.3.20.0100.03313.55
5.3.10.0000.04013.64
5.3.00.0030.03313.61
5.2.170.0100.02711.14
5.2.160.0030.03010.99
5.2.150.0000.03710.98
5.2.140.0000.03011.14
5.2.130.0000.03010.89
5.2.120.0070.02310.96
5.2.110.0130.01711.14
5.2.100.0030.02711.02
5.2.90.0030.03011.09
5.2.80.0030.02311.16
5.2.70.0000.05311.02
5.2.60.0070.04311.03
5.2.50.0000.07010.81
5.2.40.0030.02310.91
5.2.30.0070.04710.96
5.2.20.0030.05711.01
5.2.10.0000.03010.99
5.2.00.0030.03010.78
5.1.60.0030.0239.98
5.1.50.0000.02710.09
5.1.40.0030.03310.04
5.1.30.0070.02710.24
5.1.20.0100.01710.26
5.1.10.0030.02710.09
5.1.00.0000.02710.18
5.0.50.0030.0178.62
5.0.40.0030.0238.59
5.0.30.0000.0308.59
5.0.20.0030.0178.59
5.0.10.0000.0208.59
5.0.00.0000.0338.59
4.4.90.0100.0208.59
4.4.80.0000.0378.59
4.4.70.0070.0208.59
4.4.60.0030.0338.59
4.4.50.0070.0078.59
4.4.40.0030.0278.59
4.4.30.0030.0108.59
4.4.20.0000.0178.59
4.4.10.0000.0138.59
4.4.00.0030.0238.59
4.3.110.0000.0208.59
4.3.100.0000.0178.59
4.3.90.0000.0178.59
4.3.80.0070.0208.59
4.3.70.0000.0138.59
4.3.60.0000.0138.59
4.3.50.0000.0178.59
4.3.40.0000.0238.59
4.3.30.0030.0138.59
4.3.20.0000.0178.59
4.3.10.0000.0178.59
4.3.00.0000.0178.59

preferences:
36.78 ms | 401 KiB | 5 Q