3v4l.org

run code in 300+ PHP versions simultaneously
<?php function execute($pageNumber, $pageHeight){ $commands = [ "foo" => ["name" => "foo", "desc" => "Foo Desc"], "fuu" => ["name" => "fuu", "desc" => "Fuu Desc"], "bar" => ["name" => "bar", "desc" => "Bar Desc"], "baa" => ["name" => "baa", "desc" => "Baa Desc"], "blah" => ["name" => "blah", "desc" => "Blah Desc"], "fool" => ["name" => "fool", "desc" => "Fool Desc"], "boof" => ["name" => "boof", "desc" => "boof Desc"], ]; ksort($commands, SORT_NATURAL | SORT_FLAG_CASE); $commands = array_chunk($commands, $pageHeight); $pageNumber = (int) min(count($commands), $pageNumber); printf("PageNumber=%d, CountCommands=%d\n", $pageNumber, count($commands)); foreach($commands[$pageNumber - 1] as $command){ printf("Name=%s, Desc=%s\n", $command["name"], $command["desc"]); } } execute(1, 3); echo "===\n\n"; execute(2, 3); echo "===\n\n"; execute(3, 3);

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.0140.00718.55
8.3.60.0070.00718.18
8.3.50.0070.01222.05
8.3.40.0120.00318.60
8.3.30.0050.01018.89
8.3.20.0040.00420.81
8.3.10.0070.00021.78
8.3.00.0050.00519.65
8.2.190.0140.00718.35
8.2.180.0110.01118.13
8.2.170.0070.00722.96
8.2.160.0080.00820.22
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00021.08
8.2.120.0080.00026.35
8.2.110.0030.00622.12
8.2.100.0060.00617.87
8.2.90.0060.00317.97
8.2.80.0060.00319.28
8.2.70.0040.00417.63
8.2.60.0050.00318.04
8.2.50.0040.00418.10
8.2.40.0040.00420.59
8.2.30.0030.01019.39
8.2.20.0000.00718.09
8.2.10.0030.00618.06
8.2.00.0040.00417.65
8.1.280.0080.00625.92
8.1.270.0100.01021.90
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00320.70
8.1.230.0040.00721.03
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0050.00317.53
8.1.180.0060.00318.10
8.1.170.0050.00318.69
8.1.160.0040.00418.82
8.1.150.0040.00420.18
8.1.140.0080.00019.54
8.1.130.0000.00717.43
8.1.120.0000.00717.39
8.1.110.0080.00017.40
8.1.100.0040.00417.56
8.1.90.0040.00417.50
8.1.80.0000.00717.47
8.1.70.0030.00617.50
8.1.60.0000.00817.49
8.1.50.0040.00417.48
8.1.40.0040.00417.49
8.1.30.0040.00417.67
8.1.20.0030.00517.68
8.1.10.0040.00417.50
8.1.00.0000.00717.54
8.0.300.0040.00420.09
8.0.290.0000.00816.75
8.0.280.0020.00518.43
8.0.270.0040.00417.28
8.0.260.0000.00716.71
8.0.250.0030.00316.97
8.0.240.0000.00717.00
8.0.230.0070.00016.95
8.0.220.0070.00016.95
8.0.210.0070.00016.88
8.0.200.0070.00017.04
8.0.190.0100.00016.96
8.0.180.0000.00716.96
8.0.170.0030.00516.93
8.0.160.0000.00816.91
8.0.150.0000.00816.85
8.0.140.0000.00716.75
8.0.130.0000.00513.38
8.0.120.0030.00516.89
8.0.110.0040.00416.89
8.0.100.0030.00316.91
8.0.90.0000.00716.96
8.0.80.0100.00616.96
8.0.70.0020.00516.71
8.0.60.0070.00016.80
8.0.50.0040.00416.77
8.0.30.0040.01317.07
8.0.20.0120.00917.40
8.0.10.0040.00416.94
8.0.00.0160.00616.86
7.4.330.0000.00515.55
7.4.320.0000.00616.65
7.4.300.0070.00016.63
7.4.290.0000.00716.54
7.4.280.0050.00316.51
7.4.270.0040.00416.62
7.4.260.0000.00816.59
7.4.250.0040.00416.57
7.4.240.0040.00416.59
7.4.230.0000.00716.72
7.4.220.0120.00916.67
7.4.210.0090.00516.63
7.4.200.0040.00416.72
7.4.160.0110.00616.55
7.4.150.0040.01317.40
7.4.140.0150.00817.86
7.4.130.0090.00816.56
7.4.120.0120.00816.51
7.4.110.0120.00416.45
7.4.100.0090.00916.61
7.4.90.0070.01016.59
7.4.80.0030.01419.39
7.4.70.0100.00516.61
7.4.60.0110.00416.36
7.4.50.0030.01016.66
7.4.40.0080.00816.27
7.4.30.0060.01616.35
7.4.10.0000.01215.06
7.4.00.0120.00515.08
7.3.330.0030.00313.19
7.3.320.0020.00313.39
7.3.310.0040.00416.28
7.3.300.0030.00316.25
7.3.290.0080.00816.34
7.3.280.0070.01216.30
7.3.270.0090.00917.40
7.3.260.0140.00416.47
7.3.250.0130.00816.46
7.3.240.0110.00716.43
7.3.230.0100.01316.63
7.3.210.0090.00916.30
7.3.200.0040.01316.34
7.3.190.0080.00816.58
7.3.180.0160.00016.57
7.3.170.0030.01416.47
7.3.160.0080.01316.56
7.3.130.0130.00714.84
7.3.120.0040.01414.55
7.3.110.0070.01115.04
7.3.100.0130.00314.70
7.3.90.0100.00614.74
7.3.80.0070.00714.98
7.3.70.0090.00614.92
7.3.60.0070.00714.82
7.3.50.0060.00614.80
7.3.40.0060.00614.89
7.3.30.0070.00414.71
7.3.20.0040.00916.61
7.3.10.0030.00916.86
7.3.00.0110.00316.51
7.2.330.0070.01016.58
7.2.320.0040.01216.78
7.2.310.0150.00316.83
7.2.300.0090.00916.50
7.2.290.0090.00816.71
7.2.260.0090.00815.14
7.2.250.0060.01315.04
7.2.240.0030.01314.98
7.2.230.0030.01315.29
7.2.220.0100.01014.82
7.2.210.0060.00315.30
7.2.200.0030.01314.96
7.2.190.0030.01415.25
7.2.180.0030.00615.14
7.2.170.0030.01014.89
7.2.160.0100.00714.82
7.2.150.0080.00416.70
7.2.140.0030.01317.01
7.2.130.0070.01017.01
7.2.120.0040.01116.81
7.2.110.0040.01516.95
7.2.100.0080.01116.77
7.2.90.0040.00817.10
7.2.80.0000.01117.05
7.2.70.0040.01117.09
7.2.60.0050.01016.88
7.2.50.0090.00217.01
7.2.40.0070.00717.03
7.2.30.0030.01016.88
7.2.20.0060.01016.68
7.2.10.0030.00916.86
7.2.00.0100.00716.90
7.1.330.0020.01315.92
7.1.320.0070.00315.85
7.1.310.0070.00715.54
7.1.300.0070.00715.72
7.1.290.0030.00915.82
7.1.280.0110.00015.75
7.1.270.0090.00315.82
7.1.260.0080.00415.64
7.1.250.0000.01415.86
7.1.240.0080.00815.63
7.1.230.0030.01315.87
7.1.220.0060.00615.85
7.1.210.0000.01315.84
7.1.200.0060.00315.86
7.1.190.0080.00415.77
7.1.180.0040.00815.97
7.1.170.0040.00715.71
7.1.160.0070.01015.89
7.1.150.0090.00615.95
7.1.140.0030.01015.88
7.1.130.0030.00715.64
7.1.120.0000.00915.82
7.1.110.0040.01215.68
7.1.100.0000.01515.91
7.1.90.0040.00715.57
7.1.80.0100.00315.95
7.1.70.0020.00916.60
7.1.60.0050.00716.31
7.1.50.0040.00815.98
7.1.40.0040.01115.90
7.1.30.0100.00315.82
7.1.20.0060.00615.79
7.1.10.0030.01015.92
7.1.00.0070.03719.28
7.0.330.0000.01015.46
7.0.320.0090.00015.41
7.0.310.0070.00715.45
7.0.300.0070.00315.53
7.0.290.0100.00315.48
7.0.280.0000.00915.31
7.0.270.0100.00015.26
7.0.260.0060.00615.43
7.0.250.0030.00915.19
7.0.240.0070.01115.46
7.0.230.0040.00715.55
7.0.220.0040.01115.29
7.0.210.0030.01015.58
7.0.200.0190.00714.97
7.0.190.0070.00715.60
7.0.180.0040.00815.20
7.0.170.0030.00915.25
7.0.160.0040.01115.25
7.0.150.0040.01215.14
7.0.140.0090.03218.79
7.0.130.0070.03218.82
7.0.120.0090.02718.75
7.0.110.0150.02518.60
7.0.100.0110.03618.66
7.0.90.0120.03218.72
7.0.80.0120.04018.79
7.0.70.0100.02818.72
7.0.60.0100.03518.74
7.0.50.0110.03018.68
7.0.40.0080.03117.71
7.0.30.0100.02817.73
7.0.20.0080.02817.88
7.0.10.0060.03017.86
7.0.00.0030.03317.73
5.6.400.0090.00314.34
5.6.390.0070.00714.08
5.6.380.0070.00314.16
5.6.370.0070.00714.35
5.6.360.0080.00414.38
5.6.350.0090.00414.68
5.6.340.0070.01114.27
5.6.330.0060.00614.31
5.6.320.0030.01014.38
5.6.310.0000.01314.37
5.6.300.0070.01114.30
5.6.290.0050.03917.49
5.6.280.0060.03217.69
5.6.270.0090.03317.56
5.6.260.0080.02817.61
5.6.250.0000.04017.72
5.6.240.0050.03517.68
5.6.230.0070.04417.72
5.6.220.0090.03717.46
5.6.210.0120.02717.65
5.6.200.0080.03117.46
5.6.190.0050.03517.65
5.6.180.0050.03417.55
5.6.170.0090.03117.79
5.6.160.0050.03217.63
5.6.150.0020.03617.82
5.6.140.0050.03517.68
5.6.130.0130.02717.75
5.6.120.0080.03617.85
5.6.110.0080.03317.65
5.6.100.0050.03417.63
5.6.90.0060.03117.66
5.6.80.0050.03017.32
5.6.70.0050.03017.40
5.6.60.0050.03017.26
5.6.50.0030.03217.42
5.6.40.0100.02517.36
5.6.30.0100.02717.35
5.6.20.0070.03017.34
5.6.10.0100.03117.28
5.6.00.0030.02917.14

preferences:
32.36 ms | 401 KiB | 5 Q