3v4l.org

run code in 300+ PHP versions simultaneously
<?php const FOO = 1; const BAR = 2; function foo($mode = FOO) { } function bar($mode = FOO | BAR) { } $function = new ReflectionFunction(foo::class); foreach ($function->getParameters() as $param) { if (!defined("HHVM_VERSION")) { print $param->isDefaultValueConstant() ? "+ " : "- "; } print $param->getDefaultValueConstantName() . PHP_EOL; } print "-------------" . PHP_EOL; $function = new ReflectionFunction(bar::class); foreach ($function->getParameters() as $param) { if (!defined("HHVM_VERSION")) { print $param->isDefaultValueConstant() ? "+ " : "- "; } print $param->getDefaultValueConstantName() . PHP_EOL; }

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.5.30.0090.00820.21
8.5.20.0090.00820.27
8.5.10.0060.00820.16
8.5.00.0050.00520.01
8.4.180.0140.00725.72
8.4.170.0110.01023.73
8.4.160.0140.00823.75
8.4.150.0100.00416.80
8.4.140.0100.01017.50
8.4.130.0090.00817.71
8.4.120.0110.00820.68
8.4.110.0060.00219.16
8.4.100.0110.01017.85
8.4.90.0120.00720.47
8.4.80.0050.00418.87
8.4.70.0130.00718.83
8.4.60.0130.00719.07
8.4.50.0060.00318.54
8.4.40.0100.00919.33
8.4.30.0160.00317.45
8.4.20.0100.01017.65
8.4.10.0100.00317.52
8.3.300.0110.01020.68
8.3.290.0110.01020.73
8.3.280.0120.00818.51
8.3.270.0100.00916.78
8.3.260.0120.00616.53
8.3.250.0100.00918.88
8.3.240.0160.00416.46
8.3.230.0120.00716.63
8.3.220.0030.00418.77
8.3.210.0070.00718.34
8.3.200.0060.00316.51
8.3.190.0050.00417.02
8.3.180.0130.00518.91
8.3.170.0160.00318.78
8.3.160.0110.00717.35
8.3.150.0000.00919.17
8.3.140.0110.00720.66
8.3.130.0000.01118.39
8.3.120.0060.00320.59
8.3.110.0040.00420.94
8.3.100.0090.00018.59
8.3.90.0030.00626.77
8.3.80.0040.00417.97
8.3.70.0180.00016.38
8.3.60.0090.00616.50
8.3.50.0100.01121.88
8.3.40.0140.00018.56
8.3.30.0120.00618.57
8.3.20.0050.00220.38
8.3.10.0040.00421.85
8.3.00.0040.00422.44
8.2.300.0130.00817.91
8.2.290.0050.00416.91
8.2.280.0130.01020.09
8.2.270.0040.00420.61
8.2.260.0090.00918.71
8.2.250.0050.00518.23
8.2.240.0030.00718.86
8.2.230.0060.00322.58
8.2.220.0050.00524.06
8.2.210.0080.00426.77
8.2.200.0090.00018.29
8.2.190.0080.00816.58
8.2.180.0110.00616.63
8.2.170.0040.01122.96
8.2.160.0070.00719.46
8.2.150.0040.00424.18
8.2.140.0100.00024.66
8.2.130.0040.00422.09
8.2.120.0070.00026.35
8.2.110.0090.00020.94
8.2.100.0090.00317.91
8.2.90.0040.00419.01
8.2.80.0040.00417.97
8.2.70.0050.00517.60
8.2.60.0000.00817.93
8.2.50.0040.00418.10
8.2.40.0050.00322.32
8.2.30.0070.00019.17
8.2.20.0070.00017.69
8.2.10.0060.00317.92
8.2.00.0030.00717.67
8.1.340.0100.01221.65
8.1.330.0140.00516.27
8.1.320.0090.00917.90
8.1.310.0110.00418.34
8.1.300.0100.00017.96
8.1.290.0100.00030.84
8.1.280.0040.01125.92
8.1.270.0060.00323.91
8.1.260.0050.00228.09
8.1.250.0070.00028.09
8.1.240.0030.00720.84
8.1.230.0030.01017.45
8.1.220.0040.00417.76
8.1.210.0050.00518.77
8.1.200.0030.00617.48
8.1.190.0080.00019.31
8.1.180.0000.00818.10
8.1.170.0030.00618.70
8.1.160.0060.00322.21
8.1.150.0070.00018.89
8.1.140.0040.00419.46
8.1.130.0000.00817.79
8.1.120.0000.00917.44
8.1.110.0000.00717.47
8.1.100.0000.00717.50
8.1.90.0070.00017.41
8.1.80.0050.00217.50
8.1.70.0030.00317.39
8.1.60.0030.00617.58
8.1.50.0030.00617.54
8.1.40.0040.00417.50
8.1.30.0040.00417.56
8.1.20.0050.00317.61
8.1.10.0000.00717.48
8.1.00.0000.00717.51
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.50
8.0.270.0040.00417.26
8.0.260.0030.00317.30
8.0.250.0070.00016.88
8.0.240.0000.00817.01
8.0.230.0070.00416.85
8.0.220.0000.00716.90
8.0.210.0030.00316.91
8.0.200.0090.00017.01
8.0.190.0000.00917.00
8.0.180.0040.00416.94
8.0.170.0000.00716.83
8.0.160.0030.00316.94
8.0.150.0030.00316.82
8.0.140.0110.00016.84
8.0.130.0090.00013.25
8.0.120.0060.00316.88
8.0.110.0040.00416.93
8.0.100.0050.00216.90
8.0.90.0000.00716.79
8.0.80.0060.00916.86
8.0.70.0070.00016.85
8.0.60.0080.00016.80
8.0.50.0080.00016.79
8.0.30.0070.01316.96
8.0.20.0110.00917.41
8.0.10.0040.00416.88
8.0.00.0110.00716.75
7.4.330.0030.00315.09
7.4.320.0060.00016.42
7.4.300.0000.00716.52
7.4.290.0040.00416.60
7.4.280.0080.00016.60
7.4.270.0050.00216.62
7.4.260.0040.00416.59
7.4.250.0030.00316.62
7.4.240.0000.00716.42
7.4.230.0000.00716.41
7.4.220.0150.00616.55
7.4.210.0160.00316.63
7.4.200.0000.00716.56
7.4.160.0120.00416.54
7.4.150.0090.00917.40
7.4.140.0140.00317.86
7.4.130.0100.00716.41
7.4.120.0160.00716.54
7.4.110.0130.01016.51
7.4.100.0040.01516.48
7.4.90.0120.00616.46
7.4.80.0150.00619.39
7.4.70.0150.00416.38
7.4.60.0100.00716.67
7.4.50.0100.00316.15
7.4.40.0060.01516.54
7.4.30.0100.00716.33
7.4.00.0040.00814.99
7.3.330.0030.00313.32
7.3.320.0000.00513.12
7.3.310.0040.00416.24
7.3.300.0040.00416.21
7.3.290.0060.00016.11
7.3.280.0090.00916.22
7.3.270.0000.01617.40
7.3.260.0090.00916.42
7.3.250.0070.00916.29
7.3.240.0080.00916.53
7.3.230.0110.01016.39
7.3.210.0090.00916.57
7.3.200.0110.01116.46
7.3.190.0080.00816.18
7.3.180.0160.00616.40
7.3.170.0060.01616.42
7.3.160.0160.00716.38
7.2.330.0060.01316.45
7.2.320.0100.00716.73
7.2.310.0100.01116.81
7.2.300.0180.00616.79
7.2.290.0030.01416.83
7.2.60.0110.00416.43
7.2.00.0070.01319.21
7.1.200.0040.00815.44
7.1.70.0080.00016.76
7.1.60.0000.01117.16
7.1.00.0070.07322.31
7.0.200.0070.00714.79
7.0.100.0200.04320.13
7.0.90.0130.06720.06
7.0.80.0100.06019.98
7.0.70.0170.05319.98
7.0.60.0070.06020.00
7.0.50.0100.05720.44
7.0.40.0170.05020.22
7.0.30.0100.05720.34
7.0.20.0100.05720.28
7.0.10.0070.06320.38
7.0.00.0100.05720.33
5.6.250.0130.05320.68
5.6.240.0070.06020.78
5.6.230.0070.05720.81
5.6.220.0070.06020.50
5.6.210.0070.06020.70
5.6.200.0070.06721.08
5.6.190.0070.05721.09
5.6.180.0200.05021.04
5.6.170.0100.05321.18
5.6.160.0130.05021.15
5.6.150.0130.05321.04
5.6.140.0100.05321.06
5.6.130.0030.06321.06
5.6.120.0130.05021.00
5.6.110.0070.06021.04
5.6.100.0070.06320.98
5.6.90.0070.06721.03
5.6.80.0170.05020.57
5.6.70.0030.06720.40
5.6.60.0170.04720.42
5.6.50.0170.04720.48
5.6.40.0170.05320.45
5.6.30.0070.05720.36
5.6.20.0200.04720.51
5.6.10.0200.04320.45
5.6.00.0170.05020.41

preferences:
83.82 ms | 1485 KiB | 5 Q