3v4l.org

run code in 300+ PHP versions simultaneously
<?php // thanks to metaultralurker on reddit for inspiration function call(callable $fn) { return $fn(); } function map(callable $fn, \Traversable $data) { return call(function () use ($fn, $data) { foreach ($data as $v) { yield $fn($v); } }); } function filter(callable $fn, \Traversable $data) { return call(function () use ($fn, $data) { foreach ($data as $v) { if ($fn($v)) { yield $v; } } }); } $isNotZ = function ($x) { return $x !== 'Z'; }; $data = filter($isNotZ, map('strtoupper', call(function () { foreach (range('a', 'z') as $char) { yield $char; } }))); var_dump($data->current()); $data->next(); var_dump($data->current()); $data->next(); var_dump(iterator_to_array($data));

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.40.0110.00418.57
8.3.30.0130.00318.84
8.3.20.0080.00018.90
8.3.10.0000.00818.85
8.3.00.0080.00019.50
8.2.170.0110.00722.96
8.2.160.0120.00319.04
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00617.77
8.2.110.0030.00721.99
8.2.100.0060.00617.89
8.2.90.0040.00417.88
8.2.80.0040.00417.97
8.2.70.0030.00518.03
8.2.60.0000.00818.16
8.2.50.0060.00318.10
8.2.40.0040.00421.21
8.2.30.0040.00419.32
8.2.20.0060.00617.82
8.2.10.0050.00317.69
8.2.00.0060.00317.81
8.1.270.0030.00623.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00024.01
8.1.230.0000.01122.16
8.1.220.0040.00417.80
8.1.210.0050.00318.77
8.1.200.0030.00717.35
8.1.190.0060.00317.22
8.1.180.0080.00018.10
8.1.170.0090.00018.59
8.1.160.0050.00319.04
8.1.150.0040.00418.55
8.1.140.0040.00417.55
8.1.130.0000.00819.15
8.1.120.0000.00717.59
8.1.110.0070.00017.38
8.1.100.0020.00517.50
8.1.90.0000.00717.48
8.1.80.0040.00417.52
8.1.70.0030.00317.50
8.1.60.0030.00517.63
8.1.50.0050.00317.48
8.1.40.0030.00517.61
8.1.30.0070.00417.61
8.1.20.0050.00517.59
8.1.10.0040.00417.54
8.1.00.0040.00417.41
8.0.300.0050.00319.68
8.0.290.0090.00016.75
8.0.280.0080.00018.48
8.0.270.0000.00717.23
8.0.260.0030.00316.92
8.0.250.0000.00717.02
8.0.240.0040.00416.94
8.0.230.0040.00417.06
8.0.220.0000.00816.93
8.0.210.0000.00817.00
8.0.200.0070.00017.03
8.0.190.0040.00416.96
8.0.180.0120.00017.10
8.0.170.0000.00916.91
8.0.160.0030.00616.97
8.0.150.0080.00016.79
8.0.140.0030.00516.95
8.0.130.0040.00413.38
8.0.120.0060.00316.88
8.0.110.0040.00416.97
8.0.100.0040.00416.79
8.0.90.0040.00416.93
8.0.80.0120.00317.05
8.0.70.0040.00416.95
8.0.60.0000.00916.82
8.0.50.0040.00416.88
8.0.30.0090.00917.21
8.0.20.0140.00817.01
8.0.10.0040.00417.02
8.0.00.0130.00616.78
7.4.330.0050.00013.01
7.4.320.0000.00616.56
7.4.300.0030.00316.63
7.4.290.0000.00716.56
7.4.280.0000.00916.51
7.4.270.0000.00616.68
7.4.260.0030.00313.34
7.4.250.0030.00516.44
7.4.240.0040.00416.54
7.4.230.0040.00416.70
7.4.220.0130.00816.58
7.4.210.0040.01116.57
7.4.200.0000.00816.53
7.4.190.0000.00916.47
7.4.160.0160.00016.58
7.4.150.0030.01416.61
7.4.140.0120.01217.86
7.4.130.0120.00916.56
7.4.120.0150.00316.57
7.4.110.0090.01216.57
7.4.100.0120.00916.52
7.4.90.0070.01016.48
7.4.80.0130.01019.39
7.4.70.0150.00716.70
7.4.60.0050.01116.67
7.4.50.0060.00316.70
7.4.40.0060.01116.38
7.4.30.0140.00316.65
7.4.00.0080.00814.80
7.3.330.0000.00613.42
7.3.320.0030.00313.31
7.3.310.0030.00316.46
7.3.300.0000.00716.38
7.3.290.0060.01016.43
7.3.280.0030.01216.41
7.3.270.0100.00716.49
7.3.260.0160.00016.66
7.3.240.0090.00916.50
7.3.230.0070.01116.48
7.3.210.0030.01416.54
7.3.200.0120.00616.64
7.3.190.0130.00316.51
7.3.180.0070.01016.65
7.3.170.0140.00316.61
7.3.160.0030.01416.45
7.3.120.0090.00914.75
7.3.00.0040.00416.72
7.2.330.0030.01516.54
7.2.320.0080.00916.57
7.2.310.0070.01016.48
7.2.300.0090.00916.48
7.2.290.0040.01416.80
7.2.130.0040.01116.75
7.2.120.0060.00916.62
7.2.110.0040.01116.86
7.2.100.0060.00916.99
7.2.90.0040.01117.05
7.2.80.0060.00916.76
7.2.70.0090.00617.02
7.2.60.0090.00516.95
7.2.50.0000.01516.93
7.2.40.0040.00716.80
7.2.30.0070.00716.81
7.2.20.0120.00316.86
7.2.10.0110.00416.70
7.2.00.0020.01518.18
7.1.250.0000.01115.51
7.1.240.0000.01515.55
7.1.230.0050.00315.76
7.1.220.0040.00815.73
7.1.210.0030.01015.78
7.1.200.0050.00515.77
7.1.190.0060.00616.00
7.1.180.0040.00815.89
7.1.170.0070.00715.91
7.1.160.0030.00915.73
7.1.150.0000.01415.84
7.1.140.0060.00615.74
7.1.130.0080.00815.93
7.1.120.0030.01015.69
7.1.110.0030.00915.81
7.1.100.0040.01116.95
7.1.90.0030.00715.70
7.1.80.0060.00315.56
7.1.70.0060.00516.45
7.1.60.0050.01417.46
7.1.50.0050.01016.25
7.1.40.0070.00315.86
7.1.30.0030.01015.76
7.1.20.0060.00615.70
7.1.10.0060.00615.74
7.1.00.0050.02019.13
7.0.330.0040.00815.44
7.0.320.0110.00015.31
7.0.310.0060.00615.40
7.0.300.0030.00715.37
7.0.290.0100.00315.37
7.0.280.0000.01215.57
7.0.270.0060.00915.28
7.0.260.0070.00415.56
7.0.250.0040.00815.62
7.0.240.0070.00715.23
7.0.230.0090.00615.17
7.0.220.0040.00715.30
7.0.210.0080.00315.60
7.0.200.0180.00916.04
7.0.190.0090.00315.36
7.0.180.0040.00815.18
7.0.170.0060.00615.26
7.0.160.0060.00615.40
7.0.150.0040.00915.39
7.0.140.0100.03518.71
7.0.130.0080.00415.42
7.0.120.0030.04018.48
7.0.110.0090.00315.14
7.0.100.0100.00315.26
7.0.90.0030.00615.48
7.0.80.0030.01015.44
7.0.70.0060.00615.45
7.0.60.0130.04117.73
7.0.50.0050.04516.69
7.0.40.0080.04116.68
7.0.30.0230.02516.72
7.0.20.0130.02816.75
7.0.10.0050.02516.92
7.0.00.0050.04616.87
5.6.380.0070.00414.35
5.6.370.0060.00613.99
5.6.360.0000.01014.32
5.6.350.0090.00314.50
5.6.340.0120.00314.52
5.6.330.0060.00314.29
5.6.320.0090.00014.33
5.6.310.0070.01014.61
5.6.300.0120.00314.11
5.6.290.0060.00914.47
5.6.280.0050.04017.72
5.6.270.0060.01014.44
5.6.260.0070.00714.25
5.6.250.0060.00914.10
5.6.240.0060.00914.22
5.6.230.0060.00614.23
5.6.220.0060.00514.12
5.6.210.0070.02917.48
5.6.200.0070.02316.34
5.6.190.0070.03817.50
5.6.180.0130.02517.52
5.6.170.0180.04017.35
5.6.160.0050.04017.60
5.6.150.0100.04216.29
5.6.140.0070.02816.44
5.6.130.0070.04316.29
5.6.120.0100.03717.62
5.6.110.0090.04417.75
5.6.100.0050.04717.60
5.6.90.0100.04017.68
5.6.80.0050.04517.30
5.6.70.0060.00914.56
5.6.60.0090.00614.37
5.6.50.0080.00814.43
5.6.40.0070.01014.36
5.6.30.0070.00413.98
5.6.20.0060.00914.18
5.6.10.0060.00914.54
5.6.00.0030.01014.55
5.5.380.0000.00711.18
5.5.370.0090.00011.43
5.5.360.0030.00711.19
5.5.350.0130.02715.86
5.5.340.0020.03014.63
5.5.330.0100.04115.69
5.5.320.0150.04215.82
5.5.310.0130.02515.86
5.5.300.0050.03214.57
5.5.290.0060.02014.65
5.5.280.0130.04016.04
5.5.270.0050.03716.04
5.5.260.0080.04316.03
5.5.250.0050.04315.84
5.5.240.0040.04415.76
5.5.230.0050.00511.25
5.5.220.0080.00411.18
5.5.210.0000.01011.25
5.5.200.0000.01011.18
5.5.190.0000.01011.20
5.5.180.0030.00611.32
5.5.170.0000.00611.18
5.5.160.0040.00711.23
5.5.150.0040.00411.18
5.5.140.0030.00311.21
5.5.130.0070.00311.18
5.5.120.0030.00711.18
5.5.110.0030.00611.18
5.5.100.0000.01011.18
5.5.90.0000.01011.18
5.5.80.0060.00311.18
5.5.70.0000.01011.18
5.5.60.0100.00011.18
5.5.50.0040.00811.18
5.5.40.0090.00311.18
5.5.30.0060.00611.18
5.5.20.0030.00311.30
5.5.10.0050.00511.18
5.5.00.0040.00711.18
5.4.450.0070.02815.33
5.4.440.0040.02315.31
5.4.430.0020.02615.21
5.4.420.0060.02015.31
5.4.410.0050.02315.29
5.4.400.0050.03815.08
5.4.390.0070.02515.21
5.4.380.0020.04515.09
5.4.370.0060.04215.21
5.4.360.0080.03915.05
5.4.350.0090.03215.02
5.4.340.0030.04315.14
5.4.330.0040.00711.18
5.4.320.0100.02715.16
5.4.310.0050.04115.13
5.4.300.0040.04115.16
5.4.290.0010.02615.16
5.4.280.0050.04015.09
5.4.270.0050.02315.09
5.4.260.0030.02315.01
5.4.250.0060.03015.08
5.4.240.0020.03015.21
5.4.230.0050.04215.09
5.4.220.0100.02315.04
5.4.210.0030.02815.21
5.4.200.0120.01515.01
5.4.190.0020.02415.02
5.4.180.0080.02315.05
5.4.170.0030.02715.12
5.4.160.0060.02515.16
5.4.150.0070.02715.08
5.4.140.0050.03513.79
5.4.130.0070.03713.81
5.4.120.0080.01813.78
5.4.110.0090.03013.77
5.4.100.0060.02213.78
5.4.90.0050.02213.86
5.4.80.0050.01813.81
5.4.70.0070.01713.84
5.4.60.0040.01913.80
5.4.50.0120.02213.71
5.4.40.0050.01813.92
5.4.30.0070.02013.81
5.4.20.0050.01713.80
5.4.10.0020.04013.78
5.4.00.0050.02513.48
5.3.290.0060.04112.95
5.3.280.0030.04112.90
5.3.270.0070.04212.93
5.3.260.0030.04212.90
5.3.250.0060.02812.97
5.3.240.0050.03912.90
5.3.230.0050.03812.90
5.3.220.0070.03712.96
5.3.210.0100.03712.84
5.3.200.0070.02312.87
5.3.190.0060.01812.84
5.3.180.0070.02012.88
5.3.170.0030.02112.87
5.3.160.0050.02012.89
5.3.150.0020.02312.88
5.3.140.0030.02612.89
5.3.130.0030.02312.94
5.3.120.0030.02112.87
5.3.110.0080.01712.87
5.3.100.0020.02112.64
5.3.90.0030.02012.63
5.3.80.0020.02212.63
5.3.70.0020.02512.61
5.3.60.0070.01812.67
5.3.50.0030.02012.64
5.3.40.0050.01812.56
5.3.30.0000.02212.54
5.3.20.0000.02412.40
5.3.10.0020.02012.42
5.3.00.0070.01612.48
5.2.170.0030.02111.24
5.2.160.0000.01811.16
5.2.150.0010.01811.23
5.2.140.0030.01811.18
5.2.130.0010.01811.11
5.2.120.0070.01511.21
5.2.110.0020.01811.12
5.2.100.0030.01611.12
5.2.90.0000.01711.14
5.2.80.0040.01511.13
5.2.70.0040.01611.08
5.2.60.0030.01811.09
5.2.50.0030.02011.08
5.2.40.0020.01811.11
5.2.30.0000.01811.06
5.2.20.0010.01611.07
5.2.10.0030.01511.04
5.2.00.0000.01810.97
5.1.60.0030.01310.58
5.1.50.0050.01010.58
5.1.40.0060.01010.57
5.1.30.0020.01410.79
5.1.20.0000.01710.75
5.1.10.0030.01310.58
5.1.00.0020.01510.61
5.0.50.0010.0149.87
5.0.40.0020.0239.80
5.0.30.0040.0329.72
5.0.20.0060.0089.64
5.0.10.0010.0149.70
5.0.00.0050.0309.68
4.4.90.0010.0089.53
4.4.80.0030.0089.53
4.4.70.0030.0089.53
4.4.60.0010.0109.53
4.4.50.0000.0129.53
4.4.40.0020.0119.53
4.4.30.0020.0089.53
4.4.20.0010.0099.53
4.4.10.0020.0109.53
4.4.00.0040.0159.53
4.3.110.0050.0179.53
4.3.100.0010.0119.53
4.3.90.0050.0089.53
4.3.80.0030.0259.53
4.3.70.0030.0209.53
4.3.60.0020.0139.53
4.3.50.0020.0189.53
4.3.40.0030.0269.53
4.3.30.0010.0159.53
4.3.20.0000.0209.53
4.3.10.0020.0199.53
4.3.00.0020.0189.53

preferences:
47.45 ms | 400 KiB | 5 Q