3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pipeline{ public static function make_pipeline(...$funcs){ return function($args) use ($funcs){ foreach($funcs as $func){ $args = $func($args); } return $args; }; } } $c = new Pipeline(); $fun = $c::make_pipeline(function($x){ return $x*3; },function($x){ return $x-1;}, function($x){return $x/2;}); echo $fun(3); // should print 4

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.70.0090.00916.50
8.3.60.0040.01818.30
8.3.50.0070.01016.39
8.3.40.0080.00818.55
8.3.30.0070.01118.63
8.3.20.0070.00021.96
8.3.10.0080.00023.51
8.3.00.0080.00020.62
8.2.180.0090.00616.88
8.2.170.0060.00822.96
8.2.160.0100.00320.40
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00419.44
8.2.120.0040.00426.35
8.2.110.0000.00919.31
8.2.100.0110.00017.78
8.2.90.0050.00318.03
8.2.80.0040.00418.19
8.2.70.0030.00517.80
8.2.60.0050.00318.22
8.2.50.0000.00918.10
8.2.40.0040.00419.19
8.2.30.0070.00019.18
8.2.20.0070.00018.13
8.2.10.0040.00419.26
8.2.00.0000.00819.31
8.1.280.0150.00425.92
8.1.270.0040.00418.95
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0100.00023.83
8.1.230.0040.00822.70
8.1.220.0030.00517.74
8.1.210.0030.00519.03
8.1.200.0060.00317.23
8.1.190.0030.00517.23
8.1.180.0080.00318.10
8.1.170.0050.00318.48
8.1.160.0040.00418.81
8.1.150.0040.00418.75
8.1.140.0000.00722.10
8.1.130.0030.00320.17
8.1.120.0080.00317.46
8.1.110.0000.00817.38
8.1.100.0000.00717.51
8.1.90.0030.00517.49
8.1.80.0040.00417.41
8.1.70.0000.00717.46
8.1.60.0000.00817.65
8.1.50.0040.00417.52
8.1.40.0030.00517.57
8.1.30.0040.00417.64
8.1.20.0030.00517.48
8.1.10.0030.00517.43
8.1.00.0040.00417.41
8.0.300.0030.00719.90
8.0.290.0000.00716.75
8.0.280.0000.00718.36
8.0.270.0040.00417.21
8.0.260.0030.00318.37
8.0.250.0000.00716.88
8.0.240.0080.00016.86
8.0.230.0040.00416.84
8.0.220.0060.00316.79
8.0.210.0000.00816.92
8.0.200.0030.00316.97
8.0.190.0080.00017.00
8.0.180.0030.00516.85
8.0.170.0090.00016.92
8.0.160.0030.00516.99
8.0.150.0030.00416.89
8.0.140.0000.00716.75
8.0.130.0050.00013.33
8.0.120.0050.00316.89
8.0.110.0040.00416.92
8.0.100.0050.00316.73
8.0.90.0070.00016.68
8.0.80.0070.00816.84
8.0.70.0000.00716.79
8.0.60.0070.00016.83
8.0.50.0000.00816.77
8.0.30.0030.01316.91
8.0.20.0090.01117.29
8.0.10.0040.00417.14
8.0.00.0140.00416.75
7.4.330.0020.00215.55
7.4.320.0030.00316.53
7.4.300.0000.00616.58
7.4.290.0070.00016.64
7.4.280.0000.00816.52
7.4.270.0060.00316.57
7.4.260.0070.00016.57
7.4.250.0030.00416.55
7.4.240.0000.00716.63
7.4.230.0030.00316.64
7.4.220.0000.00716.63
7.4.210.0070.00816.58
7.4.200.0000.00716.41
7.4.160.0050.01216.53
7.4.140.0080.00917.86
7.4.130.0060.01216.66
7.4.120.0060.01016.44
7.4.110.0070.01016.57
7.4.100.0090.00916.45
7.4.90.0080.00816.46
7.4.80.0070.00819.39
7.4.70.0060.01116.55
7.4.60.0080.00816.43
7.4.50.0140.00016.59
7.4.40.0100.00716.44
7.4.10.0170.00014.82
7.4.00.0070.01114.92
7.3.330.0050.00013.17
7.3.320.0000.00513.23
7.3.310.0000.00716.27
7.3.300.0070.00016.38
7.3.290.0030.00316.36
7.3.280.0120.00616.30
7.3.260.0080.01116.41
7.3.240.0110.00716.55
7.3.230.0070.01016.53
7.3.210.0100.00616.46
7.3.200.0070.01016.44
7.3.190.0180.00316.59
7.3.180.0070.01016.45
7.3.170.0040.01316.28
7.3.160.0060.01016.52
7.3.130.0090.00914.85
7.3.120.0080.00815.07
7.3.110.0110.00614.59
7.3.100.0040.01014.70
7.3.90.0070.00714.80
7.3.80.0100.00214.82
7.3.70.0050.00714.75
7.3.60.0060.00914.75
7.3.50.0070.00614.76
7.3.40.0080.00714.90
7.3.30.0070.00714.61
7.3.20.0060.00916.39
7.3.10.0080.00716.55
7.3.00.0170.00715.60
7.2.330.0030.01316.79
7.2.320.0100.00716.56
7.2.310.0170.00716.82
7.2.300.0130.01016.80
7.2.290.0050.01316.74
7.2.260.0090.00914.79
7.2.250.0050.01315.02
7.2.240.0050.01114.95
7.2.230.0070.01015.19
7.2.220.0030.01415.01
7.2.210.0030.01115.12
7.2.200.0080.00615.06
7.2.190.0070.00615.08
7.2.180.0110.00615.02
7.2.170.0050.00715.02
7.2.160.0040.01414.70
7.2.150.0040.01116.69
7.2.140.0070.00716.53
7.2.130.0160.01115.80
7.2.120.0270.00615.72
7.2.110.0200.00915.88
7.2.100.0230.00715.75
7.2.90.0220.00516.03
7.2.80.0420.00915.91
7.2.70.0270.00916.08
7.2.60.0240.00715.68
7.2.50.0220.01015.97
7.2.40.0190.00615.85
7.2.30.0250.00515.91
7.2.20.0220.00816.01
7.2.10.0220.00515.91
7.2.00.0180.00816.01
7.1.330.0070.00516.03
7.1.320.0080.00515.89
7.1.310.0030.00915.76
7.1.300.0020.01515.82
7.1.290.0060.00715.85
7.1.280.0050.00915.52
7.1.270.0060.00615.61
7.1.260.0050.00715.77
7.1.250.0300.00714.78
7.1.240.0070.00715.31
7.1.230.0030.01115.71
7.1.220.0100.00315.50
7.1.210.0040.00815.18
7.1.200.0000.00915.93
7.1.190.0030.01015.53
7.1.180.0090.00915.48
7.1.170.0030.00715.65
7.1.160.0030.00715.90
7.1.150.0070.00715.68
7.1.140.0050.00515.44
7.1.130.0030.00915.48
7.1.120.0040.00715.68
7.1.110.0110.00315.43
7.1.100.0030.01015.79
7.1.90.0040.01115.77
7.1.80.0070.00715.54
7.1.70.0000.01015.79
7.1.60.0040.00415.89
7.1.50.0090.00315.66
7.1.40.0100.00315.57
7.1.30.0030.01015.85
7.1.20.0070.00715.61
7.1.10.0040.01115.87
7.1.00.0030.00715.79
7.0.330.0030.01015.16
7.0.320.0040.00715.14
7.0.310.0040.00415.14
7.0.300.0000.00915.24
7.0.290.0040.00714.87
7.0.280.0000.01015.38
7.0.270.0090.00015.05
7.0.260.0000.01415.20
7.0.250.0030.00915.30
7.0.240.0040.01215.37
7.0.230.0030.01314.79
7.0.220.0000.00815.38
7.0.210.0120.00015.19
7.0.200.0030.01015.01
7.0.190.0090.00615.14
7.0.180.0070.00415.48
7.0.170.0040.01115.25
7.0.160.0000.01015.29
7.0.150.0030.00715.48
7.0.140.0030.01015.23
7.0.130.0000.01015.10
7.0.120.0000.01215.02
7.0.110.0050.00915.13
7.0.100.0060.01214.99
7.0.90.0100.00715.61
7.0.80.0110.00015.47
7.0.70.0030.01015.46
7.0.60.0060.00615.39
7.0.50.0070.00715.18
7.0.40.0090.00613.20
7.0.30.0000.00813.39
7.0.20.0030.00913.45
7.0.10.0080.00313.09
7.0.00.0070.00713.40

preferences:
67.43 ms | 401 KiB | 5 Q