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.0090.00918.05
8.5.80.0080.00717.98
8.5.70.0090.00617.98
8.5.60.0060.00617.94
8.5.50.0060.00517.86
8.5.40.0070.00618.46
8.5.30.0090.00718.81
8.5.20.0090.00619.02
8.5.10.0120.00717.19
8.5.00.0100.00718.35
8.4.240.0110.00620.20
8.4.230.0130.01020.24
8.4.220.0120.00820.25
8.4.210.0120.00620.17
8.4.200.0140.01120.53
8.4.190.0110.00820.59
8.4.180.0080.00820.39
8.4.170.0140.00520.65
8.4.160.0090.00921.64
8.4.150.0080.00518.68
8.4.140.0140.00818.13
8.4.130.0120.00618.67
8.4.120.0100.00820.40
8.4.110.0100.00720.00
8.4.100.0120.00618.78
8.4.90.0090.00818.81
8.4.80.0070.00518.77
8.4.70.0100.00818.40
8.4.60.0130.01018.77
8.4.50.0120.00818.79
8.4.40.0110.00718.94
8.4.30.0120.01019.33
8.4.20.0150.00718.91
8.4.10.0130.00519.42
8.3.330.0100.00920.22
8.3.320.0090.00619.66
8.3.310.0090.00919.67
8.3.300.0130.01020.45
8.3.290.0110.00920.31
8.3.280.0110.00519.57
8.3.270.0130.00617.92
8.3.260.0090.01017.86
8.3.250.0140.00518.72
8.3.240.0080.00818.03
8.3.230.0110.00917.97
8.3.220.0120.00718.72
8.3.210.0110.01018.50
8.3.200.0140.00518.00
8.3.190.0090.00718.62
8.3.180.0080.00719.26
8.3.170.0120.00919.30
8.3.160.0110.00918.43
8.3.150.0140.00618.11
8.3.140.0140.00718.08
8.3.130.0110.00618.53
8.3.120.0130.00518.65
8.3.110.0100.00719.30
8.3.100.0110.00620.38
8.3.90.0090.00721.31
8.3.80.0110.00718.81
8.3.70.0130.00617.79
8.3.60.0110.00917.95
8.3.50.0120.00717.86
8.3.40.0120.00620.39
8.3.30.0100.00920.84
8.3.20.0120.00521.07
8.3.10.0110.00621.03
8.3.00.0140.00420.87
8.2.330.0120.01019.88
8.2.320.0120.01019.30
8.2.310.0100.00919.27
8.2.300.0170.00719.88
8.2.290.0150.00718.50
8.2.280.0150.00617.88
8.2.270.0120.00717.51
8.2.260.0130.00517.17
8.2.250.0190.00718.02
8.2.240.0150.00617.74
8.2.230.0140.00719.21
8.2.220.0150.00324.24
8.2.210.0150.01020.52
8.2.200.0180.00517.91
8.2.190.0170.00717.72
8.2.180.0150.00917.28
8.2.170.0130.01120.30
8.2.160.0180.00820.26
8.2.150.0190.00620.18
8.2.140.0170.00820.16
8.2.130.0170.00620.16
8.2.120.0170.00719.67
8.2.110.0160.00620.22
8.2.100.0170.00720.20
8.2.90.0190.00820.22
8.2.80.0180.00820.21
8.2.70.0170.00820.22
8.2.60.0110.00820.18
8.2.50.0170.00620.20
8.2.40.0140.01020.17
8.2.30.0160.00820.13
8.2.20.0200.00620.18
8.2.10.0180.00720.14
8.2.00.0160.01020.09
8.1.340.0260.00818.37
8.1.330.0240.00718.15
8.1.320.0240.00818.06
8.1.310.0220.00817.03
8.1.300.0190.00816.87
8.1.290.0200.00821.01
8.1.280.0220.00819.43
8.1.270.0240.00619.80
8.1.260.0190.00719.82
8.1.250.0170.00619.73
8.1.240.0140.00919.47
8.1.230.0140.00819.49
8.1.220.0150.00719.51
8.1.210.0150.00819.47
8.1.200.0120.01119.44
8.1.190.0150.00819.43
8.1.180.0180.00719.34
8.1.170.0160.00719.48
8.1.160.0150.00919.50
8.1.150.0170.00919.47
8.1.140.0170.00719.47
8.1.130.0140.00719.52
8.1.120.0090.00919.57
8.1.110.0100.00620.12
8.1.100.0110.00619.55
8.1.90.0160.00719.48
8.1.80.0150.00719.51
8.1.70.0140.00919.53
8.1.60.0120.00819.61
8.1.50.0080.01019.49
8.1.40.0130.00719.61
8.1.30.0140.00519.50
8.1.20.0130.00820.24
8.1.10.0120.00620.15
8.1.00.0100.01120.09

preferences:
50.39 ms | 1217 KiB | 5 Q