3v4l.org

run code in 300+ PHP versions simultaneously
<?php function __(string $text, string $domain = 'default') { return $text; } function register_sidebar(array $payload) { var_export($payload); echo "\n---\n"; } $input = 'sideone:1,sidetwo:1,sidethree:0'; foreach (explode(',', $input) as $pair) { if (preg_match('/^([^:]+):1$/', $pair, $m)) { register_sidebar([ 'name' => __('Footer Column ' . $m[1], 'wecodeart'), 'id' => 'footer-' . $m[1], 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ]); } }

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.10.0110.00817.04
8.5.00.0150.00920.16
8.4.150.0030.00014.05
8.4.140.0160.00617.84
8.4.130.0120.01017.91
8.4.120.0100.00623.99
8.4.110.0080.01222.41
8.4.100.0110.01018.76
8.4.90.0130.00718.86
8.4.80.0080.00818.62
8.4.70.0090.01218.11
8.4.60.0130.00718.51
8.4.50.0110.00718.84
8.4.40.0130.00617.95
8.4.30.0030.01618.94
8.4.20.0100.01019.67
8.4.10.0040.01219.92
8.3.280.0130.00718.74
8.3.270.0110.00816.96
8.3.260.0030.00616.61
8.3.250.0070.00618.73
8.3.240.0110.00817.38
8.3.230.0130.00616.91
8.3.220.0140.00519.17
8.3.210.0110.00516.65
8.3.200.0050.00416.79
8.3.190.0080.01217.34
8.3.180.0090.00619.23
8.3.170.0160.00420.59
8.3.160.0110.00717.45
8.3.150.0030.01617.00
8.3.140.0080.00020.73
8.3.130.0000.00918.67
8.3.120.0100.01019.23
8.3.110.0100.00020.94
8.3.100.0060.00324.06
8.3.90.0040.01526.77
8.3.80.0040.00417.97
8.3.70.0070.01016.73
8.3.60.0070.00718.79
8.3.50.0110.01116.79
8.3.40.0070.01320.04
8.3.30.0120.00319.05
8.3.20.0100.00721.64
8.3.10.0150.00321.94
8.3.00.0110.00719.14
8.2.290.0100.00920.33
8.2.280.0110.00818.29
8.2.270.0060.00317.43
8.2.260.0150.00318.63
8.2.250.0030.00516.82
8.2.240.0030.00617.24
8.2.230.0030.00522.58
8.2.220.0000.00937.54
8.2.210.0040.01126.77
8.2.200.0090.00318.43
8.2.190.0110.00417.00
8.2.180.0150.00016.75
8.2.170.0100.00619.04
8.2.160.0070.00720.27
8.2.150.0150.00019.13
8.2.140.0040.01120.41
8.2.130.0090.00620.47
8.2.120.0120.00319.20
8.2.110.0040.01119.22
8.2.100.0100.00319.39
8.2.90.0090.00619.14
8.2.80.0110.00419.32
8.2.70.0060.01019.01
8.2.60.0080.00819.27
8.2.50.0150.00019.09
8.2.40.0080.00818.93
8.2.30.0090.00618.65
8.2.20.0130.00318.89
8.2.10.0080.00818.81
8.2.00.0060.00918.75
8.1.330.0100.00922.02
8.1.320.0120.00716.61
8.1.310.0110.00618.48
8.1.300.0060.00318.73
8.1.290.0060.00330.84
8.1.280.0120.00325.92
8.1.270.0090.00622.03
8.1.260.0120.00422.13
8.1.250.0090.00622.05
8.1.240.0070.00718.86
8.1.230.0000.01518.64
8.1.220.0110.00418.82
8.1.210.0120.00318.68
8.1.200.0110.00418.75
8.1.190.0090.00618.51
8.1.180.0040.01218.54
8.1.170.0090.00618.82
8.1.160.0110.00418.79
8.1.150.0120.00318.69
8.1.140.0120.00318.70
8.1.130.0090.00618.88
8.1.120.0040.01118.53
8.1.110.0030.01318.66
8.1.100.0110.00619.98
8.1.90.0110.00818.57
8.1.80.0170.00019.81
8.1.70.0030.01318.84
8.1.60.0100.00718.78
8.1.50.0140.00318.60
8.1.40.0090.00918.69
8.1.30.0060.01318.99
8.1.20.0090.00920.17
8.1.10.0070.01118.81
8.1.00.0090.00618.69

preferences:
27.9 ms | 403 KiB | 5 Q