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.0060.00918.06
8.3.40.0140.00018.82
8.3.30.0110.00319.13
8.3.20.0040.00420.29
8.3.10.0040.00423.51
8.3.00.0000.00819.25
8.2.180.0110.00416.88
8.2.170.0090.00922.96
8.2.160.0190.00020.35
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00019.64
8.2.110.0040.00422.26
8.2.100.0060.00318.89
8.1.280.0100.00725.92
8.1.270.0040.01523.78
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00318.48
8.1.230.0100.00018.61
5.4.340.0040.03612.03
5.4.320.0060.03712.53
5.4.310.0040.04112.52
5.4.300.0090.03512.53
5.4.290.0100.03412.52
5.4.280.0090.03312.42
5.4.270.0050.03712.41
5.4.260.0080.03712.41
5.4.250.0030.04112.42
5.4.240.0070.04112.42
5.4.230.0060.03712.41
5.4.220.0100.03412.41
5.4.210.0060.03512.41
5.4.200.0050.04412.41
5.4.190.0080.03712.41
5.4.180.0070.03512.40
5.4.170.0100.03112.41
5.4.160.0060.03912.41
5.4.150.0140.04312.41
5.4.140.0090.03612.10
5.4.130.0090.03612.07
5.4.120.0050.03712.04
5.4.110.0060.03712.04
5.4.100.0090.03712.04
5.4.90.0070.03812.04
5.4.80.0090.03512.04
5.4.70.0100.04212.03
5.4.60.0060.03612.03
5.4.50.0110.03812.03
5.4.40.0070.03812.02
5.4.30.0090.04912.01
5.4.20.0100.04112.02
5.4.10.0070.03812.01
5.4.00.0080.03511.51
5.3.290.0050.04412.80
5.3.280.0060.04312.71
5.3.270.0040.04712.72
5.3.260.0100.04212.72
5.3.250.0130.08212.72
5.3.240.0080.04612.72
5.3.230.0030.04112.71
5.3.220.0090.03612.68
5.3.210.0130.05512.68
5.3.200.0070.03712.68
5.3.190.0030.04112.68
5.3.180.0060.03712.67
5.3.170.0050.03912.67
5.3.160.0040.03912.68
5.3.150.0100.03712.68
5.3.140.0100.03612.66
5.3.130.0050.04412.66
5.3.120.0100.03912.65
5.3.110.0040.04112.66
5.3.100.0060.03712.13
5.3.90.0050.04312.11
5.3.80.0070.03712.10
5.3.70.0060.03712.10
5.3.60.0070.04012.09
5.3.50.0060.03712.03
5.3.40.0040.03912.03
5.3.30.0070.03512.00
5.3.20.0090.04511.77
5.3.10.0100.04411.74
5.3.00.0040.04111.73
5.2.170.0020.0339.23
5.2.160.0040.0319.23
5.2.150.0040.0319.23
5.2.140.0090.0379.23
5.2.130.0080.0359.18
5.2.120.0070.0339.18
5.2.110.0060.0299.20
5.2.100.0020.0319.19
5.2.90.0060.0329.19
5.2.80.0060.0339.18
5.2.70.0050.0369.18
5.2.60.0060.0319.13
5.2.50.0050.0349.11
5.2.40.0050.0329.09
5.2.30.0060.0339.06
5.2.20.0030.0409.05
5.2.10.0080.0328.96
5.2.00.0070.0348.82
5.1.60.0030.0268.11
5.1.50.0060.0238.09
5.1.40.0050.0278.08
5.1.30.0060.0308.43
5.1.20.0060.0348.45
5.1.10.0040.0298.18
5.1.00.0040.0298.17
5.0.50.0040.0236.65
5.0.40.0040.0206.52
5.0.30.0050.0356.32
5.0.20.0030.0206.29
5.0.10.0050.0216.27
5.0.00.0020.0366.26
4.4.90.0030.0194.78
4.4.80.0070.0144.76
4.4.70.0030.0204.75
4.4.60.0060.0144.75
4.4.50.0000.0204.77
4.4.40.0020.0274.71
4.4.30.0030.0164.76
4.4.20.0050.0144.84
4.4.10.0020.0174.85
4.4.00.0040.0244.76
4.3.110.0030.0164.67
4.3.100.0060.0114.66
4.3.90.0030.0144.63
4.3.80.0040.0234.58
4.3.70.0010.0164.63
4.3.60.0030.0144.63
4.3.50.0030.0174.63
4.3.40.0030.0324.53
4.3.30.0040.0193.30
4.3.20.0050.0133.28
4.3.10.0030.0153.24
4.3.00.0030.0206.70

preferences:
38.48 ms | 400 KiB | 5 Q