3v4l.org

run code in 300+ PHP versions simultaneously
<?php function volume(int $x, int $y, int $z): int { return $x * $y * $z; } $p = fn(int $z): int => volume(3, 5, $z); // This is a useful and common way to normalize different types of callable // to a single API for reflection purposes. $c = Closure::fromCallable($p); $ref = new ReflectionFunction($c); print $ref->getNumberOfParameters() . PHP_EOL; print $ref->getParameters()[0]->getType() . PHP_EOL; print $ref->getParameters()[0]->getName() . PHP_EOL; print $ref->getReturnType() . 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.0160.00819.39
8.5.20.0110.00619.53
8.5.10.0110.00816.39
8.5.00.0160.00720.02
8.4.180.0130.00919.59
8.4.170.0110.01022.35
8.4.160.0170.00623.86
8.4.150.0090.00416.80
8.4.140.0100.01017.49
8.4.130.0110.00917.77
8.4.120.0110.00720.74
8.4.110.0050.00422.49
8.4.100.0040.00617.84
8.4.90.0060.00918.76
8.4.80.0140.00617.77
8.4.70.0050.00417.73
8.4.60.0130.00818.68
8.4.50.0130.00819.57
8.4.40.0080.01219.40
8.4.30.0100.01020.45
8.4.20.0040.01818.70
8.4.10.0060.00317.77
8.3.300.0110.00920.84
8.3.290.0080.01320.68
8.3.280.0090.01118.41
8.3.270.0120.00816.52
8.3.260.0110.00916.55
8.3.250.0110.00818.86
8.3.240.0120.00716.63
8.3.230.0150.00416.49
8.3.220.0040.00417.10
8.3.210.0090.01116.60
8.3.200.0030.00616.77
8.3.190.0050.00318.89
8.3.180.0070.00216.40
8.3.170.0180.00019.04
8.3.160.0090.00918.41
8.3.150.0070.01320.83
8.3.140.0070.01118.50
8.3.130.0030.00618.31
8.3.120.0080.00018.80
8.3.110.0000.00820.94
8.3.100.0060.00924.06
8.3.90.0110.00026.77
8.3.80.0030.00716.38
8.3.70.0070.00716.58
8.3.60.0130.00318.19
8.3.50.0100.00318.03
8.3.40.0120.00318.79
8.3.30.0110.00418.56
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.300.0140.00622.21
8.2.290.0090.01020.51
8.2.280.0140.00620.50
8.2.270.0040.01417.21
8.2.260.0060.00318.92
8.2.250.0150.00318.57
8.2.240.0110.00717.41
8.2.230.0090.00622.58
8.2.220.0080.00037.54
8.2.210.0150.00326.77
8.2.200.0040.00416.88
8.2.190.0140.00716.75
8.2.180.0040.01125.92
8.2.170.0150.00618.94
8.2.160.0140.00022.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0070.01022.16
8.2.100.0090.00317.84
8.2.90.0000.00817.75
8.2.80.0040.00418.91
8.2.70.0030.00617.63
8.2.60.0060.00318.04
8.2.50.0040.00718.07
8.2.40.0080.00018.34
8.2.30.0040.00418.06
8.2.20.0040.00418.02
8.2.10.0000.00719.41
8.2.00.0040.00419.39
8.1.340.0140.00721.48
8.1.330.0120.00821.93
8.1.320.0150.00416.37
8.1.310.0040.00418.61
8.1.300.0060.00317.87
8.1.290.0040.00430.84
8.1.280.0140.00725.92
8.1.270.0040.00423.99
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00621.98
8.1.230.0110.00017.89
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0030.00617.23
8.1.180.0050.00318.10
8.1.170.0040.00418.57
8.1.160.0000.00819.07
8.1.150.0070.00018.82
8.1.140.0040.00418.91
8.1.130.0070.00020.14
8.1.120.0000.00717.45
8.1.110.0070.00017.46
8.1.100.0000.00717.39
8.1.90.0050.00217.53
8.1.80.0030.00317.45
8.1.70.0060.00317.35
8.1.60.0040.00417.58
8.1.50.0030.00617.53
8.1.40.0040.00417.57
8.1.30.0040.00417.56
8.1.20.0060.00317.63
8.1.10.0000.01017.48
8.1.00.0070.00417.51
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0070.00018.41
8.0.270.0030.00317.88
8.0.260.0030.00318.41
8.0.250.0000.00717.01
8.0.240.0030.00316.96
8.0.230.0040.00416.86
8.0.220.0030.00516.78
8.0.210.0080.00016.93
8.0.200.0030.00316.94
8.0.190.0000.00816.84
8.0.180.0030.00516.82
8.0.170.0030.00516.89
8.0.160.0040.00416.97
8.0.150.0000.00716.78
8.0.140.0050.00216.89
8.0.130.0000.00713.36
8.0.120.0050.00516.87
8.0.110.0020.00516.75
8.0.100.0070.00016.74
8.0.90.0000.00716.81
8.0.80.0130.00516.90
8.0.70.0000.00716.84
8.0.60.0070.00016.79
8.0.50.0070.00016.80
8.0.30.0110.00916.95
8.0.20.0040.02016.93
8.0.10.0020.00917.00
8.0.00.0110.01116.97
7.4.330.0040.00015.55
7.4.320.0060.00016.50
7.4.300.0030.00316.47
7.4.290.0000.00816.38
7.4.280.0000.00816.46
7.4.270.0000.00816.63
7.4.260.0060.00013.35
7.4.250.0040.00416.51
7.4.240.0020.00516.55
7.4.230.0070.00016.60
7.4.220.0060.00116.58
7.4.210.0090.00716.63
7.4.200.0000.00816.71
7.4.160.0140.00316.55
7.4.150.0070.01116.61
7.4.140.0120.00816.35
7.4.130.0100.01116.58
7.4.120.0060.01116.44
7.4.110.0110.00716.40
7.4.100.0140.00716.44
7.4.90.0030.01416.56
7.4.80.0130.00716.51
7.4.70.0080.00816.45
7.4.60.0140.00716.62
7.4.50.0120.00916.46
7.4.40.0090.01216.50
7.4.30.0000.01516.49
7.4.20.0130.00716.50
7.4.10.0040.00416.62
7.4.00.0090.01016.55
7.3.330.0000.00716.13
7.3.320.0030.00313.07
7.3.310.0000.00716.15
7.3.300.0000.00616.23
7.3.290.0080.00816.12
7.3.270.0120.00616.11
7.3.260.0100.01016.13
7.3.250.0080.00816.10
7.3.240.0090.00916.26
7.3.230.0000.01916.12
7.3.220.0090.00916.05
7.3.210.0120.00316.02
7.3.200.0100.01016.11
7.3.190.0110.00916.04
7.3.180.0040.01516.13
7.3.170.0100.01016.09
7.3.160.0080.00916.25
7.3.150.0120.00816.13
7.3.140.0110.00616.20
7.3.130.0150.00616.12
7.3.120.0130.01916.13
7.3.110.0230.00516.05
7.3.100.0110.00815.94
7.3.90.0140.01516.30
7.3.80.0170.01816.14
7.3.70.0240.00916.19
7.3.60.0010.00116.24
7.3.50.0030.00216.11
7.3.40.0080.01216.26
7.3.30.0230.01916.18
7.3.20.0080.01016.32
7.3.10.0160.00916.23
7.3.00.0110.01816.13

preferences:
65.58 ms | 1381 KiB | 5 Q