3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = range(0, 100000); $keys = array_map(function ($x) { return chr(46+rand(0, 26)) . chr(46+rand(0, 26)) . chr(46+rand(0, 26)) . $x; }, $x); $vars = array_combine($keys, $x); function _ext() { extract(func_get_args(0)); } function _for() { foreach (func_get_args(0) as $__k => $__v) { $$__k = $__v; } unset($__k, $__v); } $t = -microtime(TRUE); _ext($vars); echo sprintf("%.4f", $t + microtime(TRUE)); $t = -microtime(TRUE); _for($vars); echo sprintf("%.4f", $t + microtime(TRUE));

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)
7.3.10.0140.06232.39
7.3.00.0200.06832.41
7.2.130.0230.05832.74
7.2.120.0230.06932.53
7.2.110.0120.06732.73
7.2.100.0390.05632.22
7.2.90.0290.05232.76
7.2.80.0100.07232.53
7.2.70.0170.07232.66
7.2.60.0160.06932.81
7.2.50.0250.06432.48
7.2.40.0200.06432.63
7.2.30.0340.06532.57
7.2.20.0260.06632.65
7.2.10.0220.06932.75
7.2.00.0270.07132.73
7.1.250.0230.09431.55
7.1.70.0000.05833.07
7.1.60.0130.05633.32
7.1.50.0100.09232.46
7.1.00.0030.12038.42
7.0.201.1010.07730.42
7.0.140.0030.13737.95
7.0.70.0070.18037.93
7.0.60.0030.11337.73
7.0.50.0000.12738.08
7.0.40.0030.14732.18
7.0.30.0070.14732.18
7.0.20.0030.13032.08
7.0.10.0130.10332.12
7.0.00.0070.13732.10
5.6.280.0200.24363.30
5.6.220.0200.16063.00
5.6.210.0230.16762.86
5.6.200.0300.20363.43
5.6.190.0330.21763.45
5.6.180.0300.21763.32
5.6.170.0130.24363.32
5.6.160.0230.19063.25
5.6.150.0200.17763.37
5.6.140.0370.21763.35
5.6.130.0270.21063.34
5.6.120.0170.18363.32
5.6.110.0230.21363.36
5.6.100.0230.18063.44
5.6.90.0070.22063.29
5.6.80.0230.17362.63
5.6.70.0270.21362.73
5.6.60.0230.15762.77
5.6.50.0170.17362.74
5.6.40.0300.20362.71
5.6.30.0130.21362.64
5.6.20.0330.19362.77
5.6.10.0370.20762.63
5.6.00.0130.21362.67
5.5.360.0330.18373.47
5.5.350.0130.21373.49
5.5.340.0270.21073.90
5.5.330.0230.23774.07
5.5.320.0300.22774.01
5.5.310.0200.26374.02
5.5.300.0170.23374.05
5.5.290.0330.21374.01
5.5.280.0200.19374.04
5.5.270.0070.21773.88
5.5.260.0130.24073.90
5.5.250.0330.22373.59
5.5.240.0400.19073.16
5.5.230.0200.25373.38
5.5.220.0230.25073.32
5.5.210.0400.24073.36
5.5.200.0300.23073.38
5.5.190.0300.20073.36
5.5.180.0170.25373.35
5.5.160.0170.25073.42
5.5.150.0300.19773.39
5.5.140.0270.23373.37
5.5.130.0100.26773.40
5.5.120.0130.25773.39
5.5.110.0230.25073.36
5.5.100.0330.24373.19
5.5.90.0070.28373.21
5.5.80.0400.21773.29
5.5.70.0100.19362.36
5.5.60.0300.21362.45
5.5.50.0370.23773.24
5.5.40.0270.24773.07
5.5.30.0370.19773.18
5.5.20.0400.23773.43
5.5.10.0300.25773.16
5.5.00.0200.21373.11
5.4.450.0300.23372.36
5.4.440.0230.25772.35
5.4.430.0270.17772.34
5.4.420.0130.20072.57
5.4.410.0270.24072.33
5.4.400.0200.23072.10
5.4.390.0400.23072.18
5.4.380.0400.23072.25
5.4.370.0170.26072.17
5.4.360.0200.25072.17
5.4.350.0270.25072.29
5.4.340.0170.26371.96
5.4.320.0200.24372.11
5.4.310.0230.24772.02
5.4.300.0330.19071.96
5.4.290.0170.26072.09
5.4.280.0130.26072.16
5.4.270.0300.24072.09
5.4.260.0300.24372.12
5.4.250.0170.21072.08
5.4.240.0270.24072.10
5.4.230.0230.26372.24
5.4.220.0170.21371.97
5.4.210.0430.21072.17
5.4.200.0570.18772.06
5.4.190.0200.23072.10
5.4.180.0170.23072.08
5.4.170.0230.21372.30
5.4.160.0270.23072.11
5.4.150.0170.24772.24
5.4.140.0270.27369.44
5.4.130.0230.21369.51
5.4.120.0330.23069.41
5.4.110.0200.24369.56
5.4.100.0170.18769.50
5.4.90.0270.14369.45
5.4.80.0030.17369.52
5.4.70.0200.17069.41
5.4.60.0300.21769.59
5.4.50.0170.18769.59
5.4.40.0130.16069.53
5.4.30.0200.14769.37
5.4.20.0200.16069.55
5.4.10.0170.23069.45
5.4.00.0430.22068.77
5.3.290.0370.25065.70
5.3.280.0330.19765.72
5.3.270.0200.23065.66
5.3.260.0200.24765.68
5.3.250.0200.24365.71
5.3.240.0200.26365.85
5.3.230.0230.25065.74
5.3.220.0100.24065.81
5.3.210.0530.23065.60
5.3.200.0230.24065.68
5.3.190.0230.21765.71
5.3.180.0100.21765.81
5.3.170.0130.22065.60
5.3.160.0100.20065.70
5.3.150.0200.19065.72
5.3.140.0130.19065.63
5.3.130.0070.17765.59
5.3.120.0200.16365.68
5.3.110.0200.18065.67
5.3.100.0070.20365.11
5.3.90.0170.16765.05
5.3.80.0170.16365.18
5.3.70.0070.17765.05
5.3.60.0100.17765.74
5.3.50.0100.26365.13
5.3.40.0130.26064.96
5.3.30.0230.24765.06
5.3.20.0030.27064.87
5.3.10.0130.21764.64
5.3.00.0270.23065.31
5.2.170.0030.02010.96
5.2.160.0000.05011.10
5.2.150.0000.02310.98
5.2.140.0000.05311.17
5.2.130.0030.05711.12
5.2.120.0000.04710.89
5.2.110.0000.05710.85
5.2.100.0070.03710.89
5.2.90.0000.04310.92
5.2.80.0030.02711.11
5.2.70.0070.05310.95
5.2.60.0030.05010.88
5.2.50.0000.03311.00
5.2.40.0030.06010.98
5.2.30.0070.05310.95
5.2.20.0000.06711.03
5.2.10.0000.03310.77
5.2.00.0030.03310.66
5.1.60.0030.04310.26
5.1.50.0000.05010.26
5.1.40.0070.04710.26
5.1.30.0030.03010.39
5.1.20.0070.05010.43
5.1.10.0030.02710.26
5.1.00.0070.05010.26
5.0.50.0030.04310.26
5.0.40.0000.04010.26
5.0.30.0000.04010.26
5.0.20.0000.04310.26
5.0.10.0000.03010.26
5.0.00.0000.06310.26
4.4.90.0000.03710.26
4.4.80.0000.03710.26
4.4.70.0000.03710.26
4.4.60.0030.03710.26
4.4.50.0030.03310.26
4.4.40.0000.03710.26
4.4.30.0000.02710.26
4.4.20.0000.01710.26
4.4.10.0030.01310.26
4.4.00.0000.05010.26
4.3.110.0000.02710.26
4.3.100.0000.01710.26
4.3.90.0000.03010.26
4.3.80.0000.02310.26
4.3.70.0000.01310.26
4.3.60.0000.02010.26
4.3.50.0000.02310.26
4.3.40.0000.04710.26
4.3.30.0030.02010.26
4.3.20.0000.03310.26
4.3.10.0000.03710.26
4.3.00.0030.02710.26

preferences:
27.5 ms | 403 KiB | 5 Q