3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test($tableau) { var_dump($tableau); return true; } } class B extends A{ public function test($tableau) { $limit = 5; $res = true; $size = count($tableau); if( $size > $limit ) { for ($i=0; $i < round($size/$limit) ; $i++) { echo ($i*$limit); $res &= parent::test(array_splice($tableau,($i*$limit),$limit)); } } return $res; } } $ar = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o'); echo count($ar)."\n----------\n"; $b = new B(); B->test($ar);

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.60.0070.00718.43
8.3.50.0080.01321.95
8.3.40.0070.00718.71
8.3.30.0110.00319.17
8.3.20.0040.00420.09
8.3.10.0040.00423.67
8.3.00.0050.00319.38
8.2.180.0070.00716.63
8.2.170.0120.00322.96
8.2.160.0090.00620.22
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0040.00419.44
8.2.110.0030.00622.08
8.2.100.0000.00918.77
8.1.280.0120.00325.92
8.1.270.0110.00722.10
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00318.41
8.1.230.0150.00418.35
5.4.340.0050.04112.03
5.4.320.0090.03912.52
5.4.310.0100.04812.53
5.4.300.0110.03912.52
5.4.290.0050.04412.52
5.4.280.0090.04412.41
5.4.270.0080.04912.42
5.4.260.0090.04912.42
5.4.250.0070.05112.41
5.4.240.0100.04812.41
5.4.230.0080.05212.41
5.4.220.0110.04712.41
5.4.210.0130.03712.41
5.4.200.0050.04012.41
5.4.190.0050.04812.40
5.4.180.0030.03912.40
5.4.170.0080.03612.41
5.4.160.0080.04012.41
5.4.150.0040.04212.41
5.4.140.0090.03312.10
5.4.130.0120.03412.08
5.4.120.0070.04212.05
5.4.110.0060.03612.04
5.4.100.0090.04512.04
5.4.90.0090.05012.04
5.4.80.0110.04712.04
5.4.70.0030.04212.03
5.4.60.0080.03412.03
5.4.50.0040.03912.03
5.4.40.0050.03912.02
5.4.30.0070.03612.02
5.4.20.0070.04412.01
5.4.10.0090.03912.02
5.4.00.0050.05511.51
5.3.290.0110.05612.80
5.3.280.0120.04512.71
5.3.270.0060.04012.72
5.3.260.0100.04212.72
5.3.250.0050.04412.72
5.3.240.0050.03912.72
5.3.230.0130.04112.70
5.3.220.0120.04712.68
5.3.210.0050.05312.68
5.3.200.0110.04712.68
5.3.190.0100.04412.68
5.3.180.0120.04412.67
5.3.170.0090.04812.67
5.3.160.0050.04512.67
5.3.150.0060.05212.67
5.3.140.0090.04612.66
5.3.130.0030.04212.65
5.3.120.0070.04512.66
5.3.110.0070.03912.66
5.3.100.0070.03712.13
5.3.90.0070.04012.11
5.3.80.0060.04312.11
5.3.70.0060.04312.11
5.3.60.0070.04112.09
5.3.50.0080.03712.03
5.3.40.0060.04412.04
5.3.30.0060.04112.00
5.3.20.0050.03611.77
5.3.10.0040.03711.74
5.3.00.0050.03811.73
5.2.170.0060.0379.23
5.2.160.0040.0589.23
5.2.150.0090.0419.23
5.2.140.0060.0299.22
5.2.130.0060.0319.19
5.2.120.0050.0299.18
5.2.110.0050.0309.20
5.2.100.0030.0309.19
5.2.90.0040.0329.19
5.2.80.0040.0359.18
5.2.70.0090.0339.19
5.2.60.0040.0359.14
5.2.50.0030.0419.11
5.2.40.0080.0529.08
5.2.30.0070.0399.06
5.2.20.0060.0379.05
5.2.10.0070.0298.95
5.2.00.0040.0368.82
5.1.60.0050.0358.10
5.1.50.0060.0288.09
5.1.40.0010.0278.08
5.1.30.0030.0278.43
5.1.20.0040.0268.45
5.1.10.0040.0398.17
5.1.00.0040.0258.17
5.0.50.0030.0216.66
5.0.40.0040.0206.51
5.0.30.0040.0366.33
5.0.20.0030.0286.29
5.0.10.0050.0216.27
5.0.00.0010.0326.27
4.4.90.0020.0174.78
4.4.80.0020.0154.76
4.4.70.0050.0124.75
4.4.60.0020.0164.75
4.4.50.0020.0164.77
4.4.40.0010.0274.70
4.4.30.0040.0144.76
4.4.20.0040.0154.85
4.4.10.0020.0174.85
4.4.00.0020.0254.76
4.3.110.0020.0174.67
4.3.100.0030.0174.66
4.3.90.0030.0174.63
4.3.80.0020.0244.58
4.3.70.0030.0204.63
4.3.60.0030.0144.63
4.3.50.0020.0164.62
4.3.40.0040.0234.54
4.3.30.0020.0163.30
4.3.20.0020.0153.28
4.3.10.0010.0163.23
4.3.00.0130.0276.70

preferences:
38.81 ms | 401 KiB | 5 Q