3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace x { define('x\_', bin2hex(random_bytes(128))); function partial(callable $f, ...$x) { return static function (...$y) use ($f, $x) { // replace every placeholder with the next passed parameter $x = array_map( function ($a) use (&$y) { return _ === $a ? array_shift($y) : $a; }, $x ); // append any remaining parameters $x = array_merge($x, $y); return $f(...$x); }; } } namespace { use const x\_; use function x\partial; $cube = partial('pow', _, 3); var_dump($cube(2)); $dash = partial('implode', '-'); var_dump($dash([1,2,3])); }

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.0.110.0040.00416.88
8.0.100.0000.00716.91
8.0.90.0040.00416.79
8.0.80.0090.00616.94
8.0.70.0040.00416.99
8.0.60.0070.00017.00
8.0.50.0040.00416.91
8.0.30.0100.00917.24
8.0.20.0120.00817.40
8.0.10.0000.00716.97
8.0.00.0120.01516.84
7.4.240.0000.00716.64
7.4.230.0030.00316.47
7.4.220.0060.00916.46
7.4.210.0090.00616.51
7.4.200.0030.00316.53
7.4.160.0080.00916.57
7.4.150.0340.01717.40
7.4.140.0100.00917.86
7.4.130.0190.00416.57
7.4.120.0120.01316.54
7.4.110.0060.01216.58
7.4.100.0090.01316.68
7.4.90.0070.01016.52
7.4.80.0070.01719.39
7.4.70.0090.01116.58
7.4.60.0060.01016.62
7.4.50.0020.01216.49
7.4.40.0090.00816.50
7.4.30.0090.00916.65
7.4.00.0100.00715.11
7.3.300.0030.00316.25
7.3.290.0090.00716.33
7.3.280.0090.00816.36
7.3.270.0120.00617.40
7.3.260.0110.00916.42
7.3.250.0130.00916.57
7.3.240.0090.00816.53
7.3.230.0110.01116.42
7.3.210.0160.00016.68
7.3.200.0110.01116.58
7.3.190.0060.01116.50
7.3.180.0060.00916.78
7.3.170.0070.01016.36
7.3.160.0120.01116.30
7.3.120.0070.01014.89
7.3.110.0070.01115.12
7.3.100.0040.01414.56
7.3.90.0000.01414.59
7.3.80.0120.00314.75
7.3.70.0060.01014.93
7.3.60.0110.00314.90
7.3.50.0070.00715.06
7.3.40.0030.00914.92
7.3.30.0030.01014.81
7.3.20.0030.01316.79
7.3.10.0080.00516.72
7.3.00.0060.00816.76
7.2.330.0030.01416.48
7.2.320.0110.00716.74
7.2.310.0040.01316.73
7.2.300.0070.01016.77
7.2.290.0080.00816.55
7.2.250.0070.01115.19
7.2.240.0070.01314.96
7.2.230.0070.01114.80
7.2.220.0100.00315.05
7.2.210.0000.01014.76
7.2.200.0040.01214.76
7.2.190.0070.00715.08
7.2.180.0030.00915.04
7.2.170.0070.00715.13
7.2.130.0040.01116.98
7.2.120.0070.00717.02
7.2.110.0000.01017.02
7.2.100.0030.01317.05
7.2.90.0040.00717.09
7.2.80.0070.00716.85
7.2.70.0000.01016.90
7.2.60.0040.00816.98
7.2.50.0100.00316.95
7.2.40.0090.00616.98
7.2.30.0070.00316.97
7.2.20.0070.00416.98
7.2.10.0030.01316.75
7.2.00.0020.01418.05
7.1.330.0150.00315.60
7.1.320.0100.00315.93
7.1.310.0130.00315.54
7.1.300.0080.00815.94
7.1.290.0080.00615.83
7.1.280.0040.00815.98
7.1.270.0000.01415.72
7.1.260.0040.00715.89
7.1.250.0120.00615.76
7.1.200.0000.01115.79
7.1.70.0080.00317.07
7.1.60.0160.00317.29
7.1.50.0830.01032.72
7.1.40.0700.01032.56
7.1.30.0370.01332.56
7.1.20.1070.01332.43
7.1.10.0430.01014.61
7.1.00.0030.01314.77
7.0.200.0070.01016.85
7.0.190.0230.01014.88
7.0.180.0630.00314.43
7.0.170.0330.00714.17
7.0.160.1370.01714.43
7.0.150.0670.01714.23
7.0.140.0670.01014.27
7.0.130.0230.01714.30
7.0.120.0070.01014.74
7.0.110.0030.01314.41
7.0.100.0900.01314.12
7.0.90.0030.01314.29
7.0.80.0930.01714.20
7.0.70.0200.01314.27
7.0.60.0670.00714.21
7.0.50.0900.01714.32
7.0.40.0730.01314.67
7.0.30.0970.00714.45
7.0.20.0900.00314.39
7.0.10.0370.01314.37
7.0.00.0030.01314.37

preferences:
26.55 ms | 403 KiB | 5 Q