3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function test($tableau) { var_dump($tableau); return true; } } class B extends A{ static 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::test($ar); var_dump(array_splice($ar,5,5));

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.0110.00418.18
8.3.50.0150.00222.05
8.3.40.0090.00618.84
8.3.30.0110.01119.08
8.3.20.0080.00020.39
8.3.10.0040.00423.71
8.3.00.0000.00819.38
8.2.180.0110.00416.38
8.2.170.0140.00722.96
8.2.160.0140.00020.48
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00319.54
8.2.110.0030.00722.27
8.2.100.0080.00417.63
8.2.90.0080.00019.35
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0050.00317.93
8.2.50.0060.00318.07
8.2.40.0040.00419.94
8.2.30.0000.00718.17
8.2.20.0080.00017.63
8.2.10.0060.00318.05
8.2.00.0040.00417.75
8.1.280.0090.00625.92
8.1.270.0060.00323.79
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00323.79
8.1.230.0050.00518.97
8.1.220.0080.00017.79
8.1.210.0050.00518.77
8.1.200.0060.00317.13
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0000.00818.65
8.1.160.0070.00022.02
8.1.150.0070.00018.80
8.1.140.0040.00417.36
8.1.130.0030.00317.88
8.1.120.0080.00017.43
8.1.110.0000.00717.37
8.1.100.0000.00717.42
8.1.90.0040.00417.51
8.1.80.0030.00417.45
8.1.70.0000.00717.39
8.1.60.0030.00517.60
8.1.50.0030.00517.55
8.1.40.0000.00817.57
8.1.30.0080.00017.69
8.1.20.0000.00817.45
8.1.10.0040.00417.44
8.1.00.0030.00717.41
8.0.300.0080.00018.77
8.0.290.0070.00016.63
8.0.280.0000.00718.43
8.0.270.0000.00717.13
8.0.260.0000.00617.21
8.0.250.0070.00016.83
8.0.240.0000.00716.97
8.0.230.0040.00416.89
8.0.220.0000.00716.79
8.0.210.0000.00716.96
8.0.200.0030.00317.00
8.0.190.0040.00416.97
8.0.180.0040.00416.96
8.0.170.0050.00316.77
8.0.160.0040.00416.84
8.0.150.0050.00316.76
8.0.140.0040.00416.83
8.0.130.0000.00613.29
8.0.120.0000.00816.92
8.0.110.0040.00416.94
8.0.100.0000.00716.76
8.0.90.0000.00716.69
8.0.80.0080.00816.80
8.0.70.0080.00016.94
8.0.60.0000.00716.96
8.0.50.0070.00016.80
8.0.30.0100.00916.97
8.0.20.0100.01017.40
8.0.10.0000.00716.98
8.0.00.0170.00316.93
7.4.330.0000.00515.02
7.4.320.0000.00816.59
7.4.300.0000.00616.55
7.4.290.0030.00516.46
7.4.280.0000.00716.39
7.4.270.0000.00716.62
7.4.260.0000.00816.59
7.4.250.0060.00316.46
7.4.240.0040.00416.60
7.4.230.0030.00316.51
7.4.220.0100.00916.63
7.4.210.0080.00816.54
7.4.200.0040.00416.60
7.4.160.0130.00316.46
7.4.150.0090.00917.40
7.4.140.0090.01117.86
7.4.130.0080.01016.58
7.4.120.0030.01616.53
7.4.110.0060.01216.50
7.4.100.0120.00616.54
7.4.90.0110.00716.52
7.4.80.0090.00919.39
7.4.70.0100.01416.34
7.4.60.0030.01716.47
7.4.50.0060.00316.61
7.4.40.0050.01316.27
7.4.30.0120.00916.32
7.4.00.0040.00814.73
7.3.330.0000.00513.23
7.3.320.0050.00013.23
7.3.310.0000.00716.39
7.3.300.0000.00716.25
7.3.290.0070.00916.37
7.3.280.0100.00716.31
7.3.270.0120.00617.40
7.3.260.0030.01416.38
7.3.250.0120.00616.61
7.3.240.0080.00816.42
7.3.230.0150.00316.39
7.3.210.0090.00916.36
7.3.200.0060.01519.39
7.3.190.0130.01016.30
7.3.180.0080.00816.34
7.3.170.0110.01116.38
7.3.160.0080.00816.45
7.3.10.0120.01216.47
7.3.00.0130.01316.61
7.2.330.0090.01016.80
7.2.320.0000.01916.59
7.2.310.0070.01216.68
7.2.300.0120.00816.50
7.2.290.0070.01516.35
7.2.130.0220.01116.45
7.2.120.0160.00316.87
7.2.110.0160.00016.89
7.2.100.0220.00616.84
7.2.90.0170.00716.97
7.2.80.0380.00816.86
7.2.70.0120.01016.64
7.2.60.0170.00316.68
7.2.50.0030.00616.81
7.2.40.0160.00816.79
7.2.30.0150.00316.96
7.2.20.0110.01116.63
7.2.10.0070.01016.80
7.2.00.0030.01018.19
7.1.250.0070.01415.43
7.1.100.0060.00617.78
7.1.70.0000.00717.06
7.1.60.0060.01317.25
7.1.50.0140.01017.01
7.1.00.0130.06722.45
7.0.200.0100.00716.56
7.0.140.0070.07322.12
7.0.60.0030.08719.92
7.0.50.0200.06017.73
7.0.40.0070.08320.05
7.0.30.0200.04320.34
7.0.20.0230.07020.16
7.0.10.0070.06020.32
7.0.00.0000.04320.09
5.6.280.0000.07720.91
5.6.210.0100.06020.76
5.6.200.0100.08318.22
5.6.190.0070.07720.61
5.6.180.0300.06320.67
5.6.170.0070.05020.57
5.6.160.0030.04020.51
5.6.150.0070.08018.25
5.6.140.0000.06318.22
5.6.130.0070.07718.12
5.6.120.0100.08321.15
5.6.110.0130.08021.12
5.6.100.0100.08020.89
5.6.90.0130.07720.98
5.6.80.0070.06720.47
5.6.70.0530.04320.41
5.5.350.0270.07720.54
5.5.340.0030.08317.98
5.5.330.0130.07720.45
5.5.320.0270.04320.35
5.5.310.0230.07020.20
5.5.300.0030.06717.99
5.5.290.0030.04717.94
5.5.280.0030.04320.97
5.5.270.0100.04320.90
5.5.260.0000.06020.80
5.5.250.0070.08020.51
5.5.240.0230.06020.20
5.4.450.0700.06319.61
5.4.440.0800.06019.37
5.4.430.0800.05019.30
5.4.420.0100.06019.69
5.4.410.0670.05719.03
5.4.400.1230.07318.67
5.4.390.1330.06018.84
5.4.380.0500.05718.57
5.4.370.0330.04718.77
5.4.360.0270.05718.73
5.4.350.0370.04318.79
5.4.340.0080.03912.02
5.4.320.0040.03812.51
5.4.310.0040.04212.51
5.4.300.0070.03712.51
5.4.290.0050.03912.50
5.4.280.0070.03412.40
5.4.270.0060.03612.40
5.4.260.0080.03712.40
5.4.250.0050.03912.41
5.4.240.0080.03612.40
5.4.230.0070.03812.39
5.4.220.0050.03812.39
5.4.210.0100.03112.40
5.4.200.0050.03912.39
5.4.190.0050.03912.39
5.4.180.0090.03412.39
5.4.170.0050.04012.41
5.4.160.0070.03712.40
5.4.150.0050.04112.39
5.4.140.0080.03612.08
5.4.130.0040.03712.07
5.4.120.0060.03812.02
5.4.110.0050.03712.02
5.4.100.0050.03612.02
5.4.90.0050.03712.02
5.4.80.0060.03612.02
5.4.70.0070.03312.02
5.4.60.0060.03412.02
5.4.50.0050.03712.01
5.4.40.0050.03912.00
5.4.30.0060.03512.00
5.4.20.0090.03312.00
5.4.10.0070.03611.99
5.4.00.0060.03611.48
5.3.290.0050.04212.80
5.3.280.0040.04012.71
5.3.270.0060.04512.73
5.3.260.0090.03612.72
5.3.250.0080.04512.72
5.3.240.0050.04212.72
5.3.230.0070.03912.71
5.3.220.0030.04012.68
5.3.210.0050.03912.68
5.3.200.0050.03712.68
5.3.190.0120.03512.68
5.3.180.0070.04212.67
5.3.170.0060.03712.67
5.3.160.0080.03512.68
5.3.150.0060.03912.68
5.3.140.0090.04212.66
5.3.130.0080.05112.66
5.3.120.0080.03812.66
5.3.110.0070.03912.66
5.3.100.0080.03612.13
5.3.90.0050.04512.11
5.3.80.0120.03812.10
5.3.70.0070.03712.10
5.3.60.0080.03412.08
5.3.50.0080.03912.03
5.3.40.0110.03612.03
5.3.30.0070.03511.99
5.3.20.0060.03711.77
5.3.10.0060.03711.74
5.3.00.0080.03411.73
5.2.170.0100.0289.23
5.2.160.0040.0309.22
5.2.150.0040.0319.23
5.2.140.0070.0289.22
5.2.130.0030.0309.18
5.2.120.0060.0279.18
5.2.110.0030.0319.19
5.2.100.0050.0289.18
5.2.90.0050.0289.19
5.2.80.0040.0349.18
5.2.70.0080.0309.18
5.2.60.0040.0329.13
5.2.50.0050.0339.10
5.2.40.0040.0329.08
5.2.30.0040.0369.06
5.2.20.0070.0269.05
5.2.10.0060.0318.95
5.2.00.0060.0288.82
5.1.60.0050.0238.10
5.1.50.0080.0228.10
5.1.40.0060.0238.08
5.1.30.0070.0248.43
5.1.20.0030.0298.45
5.1.10.0050.0278.17
5.1.00.0040.0278.18
5.0.50.0030.0306.65
5.0.40.0050.0286.51
5.0.30.0050.0356.32
5.0.20.0070.0156.29
5.0.10.0040.0206.27
5.0.00.0040.0346.27
4.4.90.0040.0204.77
4.4.80.0040.0154.76
4.4.70.0030.0164.75
4.4.60.0040.0224.75
4.4.50.0010.0184.77
4.4.40.0010.0274.71
4.4.30.0020.0184.76
4.4.20.0020.0164.84
4.4.10.0030.0154.85
4.4.00.0060.0244.76
4.3.110.0030.0174.67
4.3.100.0020.0164.66
4.3.90.0010.0194.63
4.3.80.0020.0294.58
4.3.70.0000.0174.63
4.3.60.0020.0154.63
4.3.50.0030.0294.63
4.3.40.0020.0244.54
4.3.30.0020.0163.30
4.3.20.0010.0213.28
4.3.10.0020.0153.23
4.3.00.0000.0236.72

preferences:
51.77 ms | 401 KiB | 5 Q