3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Project: SmartyPaginate: Pagination for the Smarty Template Engine * File: function.paginate_next.php * Author: Monte Ohrt <monte at newdigitalgroup dot com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @link http://www.phpinsider.com/php/code/SmartyPaginate/ * @copyright 2001-2005 New Digital Group, Inc. * @author Monte Ohrt <monte at newdigitalgroup dot com> * @package SmartyPaginate * @version 1.6-dev */ function smarty_function_paginate_next($params, &$smarty) { $_id = 'default'; $_attrs = array(); if (!class_exists('SmartyPaginate')) { $smarty->trigger_error("paginate_next: missing SmartyPaginate class"); return; } if (!isset($_SESSION['SmartyPaginate'])) { $smarty->trigger_error("paginate_next: SmartyPaginate is not initialized, use connect() first"); return; } foreach($params as $_key => $_val) { switch($_key) { case 'id': if (!SmartyPaginate::isConnected($_val)) { $smarty->trigger_error("paginate_next: unknown id '$_val'"); return; } $_id = $_val; break; default: $_attrs[] = $_key . '="' . $_val . '"'; break; } } if (SmartyPaginate::getTotal($_id) === false) { $smarty->trigger_error("paginate_next: total was not set"); return; } $_url = SmartyPaginate::getURL($_id); $_attrs = !empty($_attrs) ? ' ' . implode(' ', $_attrs) : ''; if(($_item = SmartyPaginate::_getNextPageItem($_id)) !== false) { $_show = true; $_text = isset($params['text']) ? $params['text'] : SmartyPaginate::getNextText($_id); $_url .= (strpos($_url, '?') === false) ? '?' : '&'; $_url .= SmartyPaginate::getUrlVar($_id) . '=' . $_item; } else { $_show = false; } return $_show ? '<a rel="nofollow" href="' . str_replace('&','&amp;', $_url) . '"' . $_attrs . '>' . $_text . '</a>' : ''; } ?>

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.0060.01218.43
8.3.50.0090.01221.99
8.3.40.0150.00618.68
8.3.30.0110.00418.92
8.3.20.0120.00620.30
8.3.10.0140.00422.02
8.3.00.0040.00422.46
8.2.180.0080.00816.32
8.2.170.0060.00922.96
8.2.160.0090.00620.64
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00919.11
8.2.110.0060.00322.21
8.2.100.0110.00017.72
8.2.90.0080.00019.11
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0090.00317.80
8.2.50.0000.00918.07
8.2.40.0040.00418.09
8.2.30.0040.00417.86
8.2.20.0000.00717.45
8.2.10.0080.00017.66
8.2.00.0040.00417.64
8.1.280.0090.00925.92
8.1.270.0130.00722.02
8.1.260.0130.00426.35
8.1.250.0110.00728.09
8.1.240.0070.00323.98
8.1.230.0070.00418.98
8.1.220.0000.00717.74
8.1.210.0050.00318.77
8.1.200.0060.00317.11
8.1.190.0040.00417.28
8.1.180.0000.00818.10
8.1.170.0000.00818.38
8.1.160.0000.00821.89
8.1.150.0040.00418.57
8.1.140.0020.00517.34
8.1.130.0040.00417.91
8.1.120.0040.00417.37
8.1.110.0000.00817.35
8.1.100.0080.00017.29
8.1.90.0000.00817.31
8.1.80.0040.00417.38
8.1.70.0000.00817.33
8.1.60.0000.00717.50
8.1.50.0000.00717.34
8.1.40.0050.00317.43
8.1.30.0030.00617.50
8.1.20.0040.00417.52
8.1.10.0040.00417.45
8.1.00.0000.00817.43
8.0.300.0040.00418.77
8.0.290.0040.00417.16
8.0.280.0070.00018.34
8.0.270.0030.00317.09
8.0.260.0000.00716.60
8.0.250.0040.00416.87
8.0.240.0030.00316.72
8.0.230.0030.00316.75
8.0.220.0000.00716.81
8.0.210.0050.00316.79
8.0.200.0000.00716.88
8.0.190.0050.00316.85
8.0.180.0040.00416.85
8.0.170.0000.00916.85
8.0.160.0070.00016.80
8.0.150.0050.00216.85
8.0.140.0030.00416.65
8.0.130.0030.00313.27
8.0.120.0040.00416.80
8.0.110.0000.00716.84
8.0.100.0000.00716.87
8.0.90.0000.00716.77
8.0.80.0040.01516.79
8.0.70.0080.00016.87
8.0.60.0000.00716.76
8.0.50.0040.00416.67
8.0.30.0100.01316.95
8.0.20.0140.01017.40
8.0.10.0080.00016.98
8.0.00.0070.01016.66
7.4.330.0050.00015.00
7.4.320.0030.00316.43
7.4.300.0000.00616.45
7.4.290.0030.00316.43
7.4.280.0070.00016.52
7.4.270.0030.00316.57
7.4.260.0090.00016.54
7.4.250.0070.00016.23
7.4.240.0040.00416.44
7.4.230.0030.00316.32
7.4.220.0090.00916.36
7.4.210.0070.00816.51
7.4.200.0050.00316.52
7.4.190.0040.00316.47
7.4.160.0090.00516.32
7.4.150.0170.00317.40
7.4.140.0140.00517.86
7.4.130.0080.01016.49
7.4.120.0100.00916.43
7.4.110.0090.00916.50
7.4.100.0040.01716.39
7.4.90.0030.01416.41
7.4.80.0110.00719.39
7.4.70.0130.00316.40
7.4.60.0070.01016.46
7.4.50.0000.00816.43
7.4.40.0060.00322.77
7.4.30.0060.01016.50
7.4.00.0040.00814.49
7.3.330.0000.00613.17
7.3.320.0030.00313.15
7.3.310.0070.00016.22
7.3.300.0030.00316.21
7.3.290.0090.01016.34
7.3.280.0050.01016.21
7.3.270.0060.01517.40
7.3.260.0120.00616.17
7.3.250.0110.00816.32
7.3.240.0120.00616.43
7.3.230.0110.00716.40
7.3.210.0150.00316.50
7.3.200.0140.00319.39
7.3.190.0100.01016.51
7.3.180.0070.00716.25
7.3.170.0060.01316.27
7.3.160.0070.01016.23
7.3.120.0080.00314.64
7.2.330.0080.00816.52
7.2.320.0030.01516.47
7.2.310.0070.01016.58
7.2.300.0090.01216.43
7.2.290.0160.00016.32
7.2.00.0080.00819.20
7.1.100.0040.00918.13
7.1.70.0030.00516.76
7.1.60.0100.01019.82
7.1.50.0040.01816.95
7.1.00.0100.06722.48
7.0.200.0110.00416.36
7.0.140.0030.07322.00
7.0.70.0030.03321.68
7.0.60.0070.02721.63
7.0.50.0000.05022.11
7.0.40.0030.08720.04
7.0.30.0030.08719.99
7.0.20.0070.07720.07
7.0.10.0030.08020.18
7.0.00.0070.04720.15
5.6.280.0070.07020.89
5.6.220.0000.03320.46
5.6.210.0000.03320.46
5.6.200.0030.08321.07
5.6.190.0030.08720.96
5.6.180.0070.07721.12
5.6.170.0070.06721.05
5.6.160.0030.07721.09
5.6.150.0070.08021.09
5.6.140.0030.08321.12
5.6.130.0070.08021.03
5.6.120.0170.07321.04
5.6.110.0000.08721.11
5.6.100.0070.08320.96
5.6.90.0030.08321.01
5.6.80.0100.06020.35
5.6.70.0000.08320.43
5.6.60.0070.07320.40
5.6.50.0070.07320.43
5.6.40.0030.07720.43
5.6.30.0070.06720.39
5.6.20.0070.08020.38
5.6.10.0030.07720.36
5.6.00.0070.07320.48
5.5.360.0030.04320.38
5.5.350.0030.03020.43
5.5.340.0030.03020.94
5.5.330.0070.04320.90
5.5.320.0030.04320.88
5.5.310.0030.08720.80
5.5.300.0030.06020.89
5.5.290.0070.07720.78
5.5.280.0000.05020.80
5.5.270.0070.06720.87
5.5.260.0100.08020.91
5.5.250.0100.04720.73
5.5.240.0070.07320.24
5.5.230.0030.07320.03
5.5.220.0130.06320.16
5.5.210.0100.05720.18
5.5.200.0000.05720.12
5.5.190.0030.08020.13
5.5.180.0070.08020.19
5.5.160.0030.07720.29
5.5.150.0070.07020.27
5.5.140.0030.08320.18
5.5.130.0000.07320.22
5.5.120.0070.07720.16
5.5.110.0000.08320.28
5.5.100.0000.07720.11
5.5.90.0070.06720.15
5.5.80.0100.07020.18
5.5.70.0130.07320.12
5.5.60.0070.07719.96
5.5.50.0000.07720.06
5.5.40.0000.05719.97
5.5.30.0070.05320.10
5.5.20.0030.06020.17
5.5.10.0000.08720.13
5.5.00.0070.07720.04
5.4.450.0030.07019.36
5.4.440.0030.08319.36
5.4.430.0030.08019.34
5.4.420.0000.09019.49
5.4.410.0070.07719.39
5.4.400.0070.05719.13
5.4.390.0130.06719.12
5.4.380.0070.07319.14
5.4.370.0100.07319.15
5.4.360.0070.05718.87
5.4.350.0000.07718.86
5.4.340.0130.07018.93
5.4.320.0100.07719.15
5.4.310.0070.07018.96
5.4.300.0000.07718.93
5.4.290.0070.07019.11
5.4.280.0030.07319.13
5.4.270.0030.07318.84
5.4.260.0030.06019.21
5.4.250.0030.07019.02
5.4.240.0000.06719.14
5.4.230.0030.07318.93
5.4.220.0030.04019.01
5.4.210.0070.07018.88
5.4.200.0000.08019.11
5.4.190.0070.06718.83
5.4.180.0070.05019.08
5.4.170.0070.07019.10
5.4.160.0000.07719.15
5.4.150.0030.07719.01
5.4.140.0030.07316.30
5.4.130.0000.07316.39
5.4.120.0030.07316.27
5.4.110.0030.07316.39
5.4.100.0030.07016.27
5.4.90.0070.05716.47
5.4.80.0000.07316.43
5.4.70.0000.05016.34
5.4.60.0070.07016.45
5.4.50.0100.03316.40
5.4.40.0030.07316.38
5.4.30.0000.06016.32
5.4.20.0030.05316.41
5.4.10.0070.06716.47
5.4.00.0030.07715.79
5.3.290.0100.07314.82
5.3.280.0030.07314.75
5.3.270.0100.04314.76
5.3.260.0070.07714.55
5.3.250.0000.06314.69
5.3.240.0070.06314.71
5.3.230.0070.04714.70
5.3.220.0030.06714.59
5.3.210.0100.07314.64
5.3.200.0030.05714.61
5.3.190.0030.05014.60
5.3.180.0070.07014.61
5.3.170.0030.05014.57
5.3.160.0000.05314.56
5.3.150.0100.03014.69
5.3.140.0000.08014.50
5.3.130.0030.07714.59
5.3.120.0130.07314.70
5.3.110.0000.07014.54
5.3.100.0030.07714.03
5.3.90.0030.07014.16
5.3.80.0030.06014.09
5.3.70.0070.06714.13
5.3.60.0070.07014.03
5.3.50.0000.08014.03
5.3.40.0070.07013.89
5.3.30.0000.07713.81
5.3.20.0030.07013.73
5.3.10.0030.07013.70
5.3.00.0030.07013.77
5.2.170.0070.05711.24
5.2.160.0000.05011.24
5.2.150.0030.06311.30
5.2.140.0070.06311.24
5.2.130.0030.06311.24
5.2.120.0100.06011.24
5.2.110.0070.05711.26
5.2.100.0030.05311.24
5.2.90.0070.06011.24
5.2.80.0000.05711.24
5.2.70.0030.06011.24
5.2.60.0070.04311.24
5.2.50.0030.06011.24
5.2.40.0070.05711.24
5.2.30.0100.05711.24
5.2.20.0070.06011.24
5.2.10.0030.05311.24
5.2.00.0000.04011.24
5.1.60.0000.05711.24
5.1.50.0070.04711.24
5.1.40.0030.05011.24
5.1.30.0000.05711.24
5.1.20.0000.06011.24
5.1.10.0000.05711.24
5.1.00.0000.05011.24
5.0.50.0000.04711.24
5.0.40.0000.04311.24
5.0.30.0100.05311.24
5.0.20.0000.04311.24
5.0.10.0070.04011.24
5.0.00.0000.06711.24
4.4.90.0030.03311.24
4.4.80.0030.03011.24
4.4.70.0000.03311.24
4.4.60.0000.03311.24
4.4.50.0130.02311.24
4.4.40.0030.04311.24
4.4.30.0030.03311.24
4.4.20.0000.04011.24
4.4.10.0000.03311.24
4.4.00.0030.05011.24
4.3.110.0070.02711.24
4.3.100.0030.02711.24
4.3.90.0070.03311.24
4.3.80.0000.05711.24
4.3.70.0070.02711.24
4.3.60.0000.03711.24
4.3.50.0030.03011.24
4.3.40.0030.05011.24
4.3.30.0000.03711.24
4.3.20.0000.03711.24
4.3.10.0000.03311.24
4.3.00.0030.03311.24

preferences:
46.2 ms | 401 KiB | 5 Q