3v4l.org

run code in 500+ PHP versions simultaneously
<?php $_GET['sortBy'] = 'B'; function get_permalink() { return 'someurl'; } function get_terms($array) { return ['foo', 'bar', 'öle', 'can']; } function esc_html($string) { return htmlspecialchars($string, ENT_QUOTES); } function alpha_pagination() { $chars = array_fill_keys(range('A', 'Z'), false); foreach (get_terms(['taxonomy' => 'unknown', 'hide_empty' => true]) as $tax) { $chars[mb_strtoupper(mb_substr($tax, 0, 1))] = true; } ksort($chars); foreach ($chars as $char => $hasTerms) { $selected = ($_GET['sortBy'] ?? '_') === $char ? ' selected' : ''; if ($hasTerms) { printf( '<a class="button%s" href="%s?%s">%s</a>', $selected, get_permalink(), http_build_query(['sortby' => $char]), esc_html($char) ); } else { printf( '<span class="button disabled%s">%s</span>', $selected, esc_html($char) ); } echo "\n"; } } alpha_pagination();

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.5.90.0100.00817.77
8.5.80.0070.00517.73
8.5.70.0070.00717.76
8.5.60.0040.00517.66
8.5.50.0030.00417.60
8.5.40.0050.00218.46
8.5.30.0080.00519.05
8.5.20.0060.00619.31
8.5.10.0080.00617.46
8.5.00.0080.00719.18
8.4.240.0070.00520.52
8.4.230.0120.01020.58
8.4.220.0090.00720.58
8.4.210.0080.00720.52
8.4.200.0130.00921.40
8.4.190.0060.00521.51
8.4.180.0040.00620.70
8.4.170.0120.00521.09
8.4.160.0070.00922.64
8.4.150.0060.00518.36
8.4.140.0140.00918.49
8.4.130.0130.00719.09
8.4.120.0110.00921.77
8.4.110.0120.00720.98
8.4.100.0130.00819.22
8.4.90.0090.01019.26
8.4.80.0080.00519.20
8.4.70.0080.00718.70
8.4.60.0120.00919.26
8.4.50.0100.00919.23
8.4.40.0090.00718.64
8.4.30.0100.01019.26
8.4.20.0140.00718.62
8.4.10.0130.00219.40
8.3.330.0070.00920.19
8.3.320.0060.00419.43
8.3.310.0060.00919.39
8.3.300.0120.01020.62
8.3.290.0100.00920.46
8.3.280.0110.00719.32
8.3.270.0120.00817.58
8.3.260.0090.01117.54
8.3.250.0120.00518.79
8.3.240.0060.00617.78
8.3.230.0090.00817.70
8.3.220.0120.00518.72
8.3.210.0090.00918.50
8.3.200.0120.00517.83
8.3.190.0080.00418.72
8.3.180.0060.00619.70
8.3.170.0100.00919.59
8.3.160.0120.00718.42
8.3.150.0130.00517.95
8.3.140.0130.00517.96
8.3.130.0070.00718.49
8.3.120.0100.00418.72
8.3.110.0090.00619.74
8.3.100.0100.00421.27
8.3.90.0060.00522.66
8.3.80.0090.00619.00
8.3.70.0120.00617.47
8.3.60.0110.00817.61
8.3.50.0110.00617.56
8.3.40.0090.00620.71
8.3.30.0070.00921.36
8.3.20.0100.00521.73
8.3.10.0090.00621.64
8.3.00.0130.00221.39
8.2.330.0080.01319.84
8.2.320.0100.00819.12
8.2.310.0070.00719.00
8.2.300.0090.00620.90
8.2.290.0080.00719.43
8.2.280.0080.00718.40
8.2.270.0040.00617.96
8.2.260.0050.00317.46
8.2.250.0140.00618.83
8.2.240.0070.00618.35
8.2.230.0060.00620.44
8.2.220.0080.00127.99
8.2.210.0080.01122.53
8.2.200.0140.00218.61
8.2.190.0100.00718.38
8.2.180.0090.00917.61
8.2.170.0070.01121.41
8.2.160.0130.00821.35
8.2.150.0150.00621.35
8.2.140.0090.01021.30
8.2.130.0100.00721.30
8.2.120.0120.00620.49
8.2.110.0090.00521.35
8.2.100.0110.00721.37
8.2.90.0110.00921.38
8.2.80.0150.00621.31
8.2.70.0110.00821.35
8.2.60.0080.00721.31
8.2.50.0120.00621.31
8.2.40.0070.01121.32
8.2.30.0110.00621.25
8.2.20.0140.00621.32
8.2.10.0140.00521.29
8.2.00.0070.01121.29
8.1.340.0220.00718.66
8.1.330.0220.00619.14
8.1.320.0210.00818.91
8.1.310.0190.00717.42
8.1.300.0140.00717.12
8.1.290.0170.00623.44
8.1.280.0180.00921.12
8.1.270.0190.00620.81
8.1.260.0140.00720.84
8.1.250.0140.00620.74
8.1.240.0120.00820.37
8.1.230.0130.00820.37
8.1.220.0150.00420.37
8.1.210.0130.00720.35
8.1.200.0090.01220.30
8.1.190.0130.00720.29
8.1.180.0160.00620.21
8.1.170.0160.00520.33
8.1.160.0130.01120.38
8.1.150.0160.00820.38
8.1.140.0140.00620.36
8.1.130.0100.00620.38
8.1.120.0030.00920.43
8.1.110.0080.00620.39
8.1.100.0100.00420.48
8.1.90.0150.00620.39
8.1.80.0150.00720.36
8.1.70.0100.01120.39
8.1.60.0090.00920.45
8.1.50.0040.00920.33
8.1.40.0140.00720.45
8.1.30.0160.00420.35
8.1.20.0100.00921.36
8.1.10.0100.00521.32
8.1.00.0080.01121.26

preferences:
63.89 ms | 1224 KiB | 5 Q