3v4l.org

run code in 300+ PHP versions simultaneously
<?php $product = array('material', 'britelki', 'chaschka', 'kostochki', 'vkladish', 'zastejka'); function create_from_variable($arr){ foreach($arr as $key){ $var = "show_the_product_".$key; $$var = function(){ echo '123'; } } } create_from_variable($product);

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)
5.4.270.0370.03718.94
5.4.260.0300.05019.16
5.4.250.0370.03319.07
5.4.240.0430.03719.24
5.4.230.0430.04319.25
5.4.220.0470.05019.19
5.4.210.0370.04719.10
5.4.200.0370.04019.15
5.4.190.0430.03719.12
5.4.180.0330.04318.97
5.4.170.0570.03718.96
5.4.160.0500.03718.93
5.4.150.0400.04318.85
5.4.140.0430.03716.57
5.4.130.0400.04016.37
5.4.120.0470.04016.35
5.4.110.0470.04716.24
5.4.100.0400.04016.61
5.4.90.0430.03316.31
5.4.80.0500.03716.59
5.4.70.0570.06016.49
5.4.60.0400.04716.52
5.4.50.0400.04716.43
5.4.40.0570.05716.24
5.4.30.0400.04316.34
5.4.20.0430.03316.32
5.4.10.0400.03716.42
5.4.00.0500.02715.73
5.3.280.0570.02714.50
5.3.270.0430.03714.63
5.3.260.0500.04714.60
5.3.250.0430.04014.69
5.3.240.0630.06314.76
5.3.230.0470.04714.52
5.3.220.0570.05714.48
5.3.210.0530.06014.79
5.3.200.0470.03714.47
5.3.190.0630.05714.47
5.3.180.0530.03014.54
5.3.170.0400.05014.58
5.3.160.0500.04714.48
5.3.150.0470.04714.49
5.3.140.0400.04014.61
5.3.130.0570.06714.69
5.3.120.0470.05314.77
5.3.110.0400.04014.77
5.3.100.0570.05314.12
5.3.90.0430.05314.00
5.3.80.0500.06314.25
5.3.70.0400.06013.93
5.3.60.0370.03313.93
5.3.50.0400.05713.96
5.3.40.0400.05714.17
5.3.30.0430.03713.99
5.3.20.0470.03713.70
5.3.10.0500.04313.78
5.3.00.0570.05013.57
5.2.170.0230.03311.06
5.2.160.0400.05011.04
5.2.150.0370.04011.30
5.2.140.0230.03311.07
5.2.130.0430.02710.99
5.2.120.0430.05011.15
5.2.110.0370.02711.05
5.2.100.0470.03310.98
5.2.90.0400.04011.32
5.2.80.0400.03311.00
5.2.70.0400.05311.25
5.2.60.0500.05011.12
5.2.50.0500.04711.27
5.2.40.0370.02710.95
5.2.30.0400.05010.88
5.2.20.0400.05010.93
5.2.10.0330.02710.84
5.2.00.0300.02710.76
5.1.60.0370.0379.88
5.1.50.0430.03010.07
5.1.40.0300.02710.21
5.1.30.0370.05010.55
5.1.20.0370.04010.40
5.1.10.0330.0309.96
5.1.00.0330.02310.15
5.0.50.0130.0238.46
5.0.40.0130.0278.30
5.0.30.0170.0478.27
5.0.20.0270.0208.18
5.0.10.0230.0408.26
5.0.00.0200.0438.39
4.4.90.0130.0207.77
4.4.80.0200.0277.77
4.4.70.0170.0337.77
4.4.60.0200.0177.77
4.4.50.0170.0137.77
4.4.40.0330.0407.77
4.4.30.0170.0177.77
4.4.20.0200.0137.77
4.4.10.0100.0237.77
4.4.00.0200.0307.77
4.3.110.0170.0207.77
4.3.100.0130.0237.77
4.3.90.0230.0207.77
4.3.80.0170.0277.77
4.3.70.0230.0277.77
4.3.60.0230.0137.77
4.3.50.0200.0237.77
4.3.40.0300.0407.77
4.3.30.0130.0337.77
4.3.20.0130.0307.77
4.3.10.0070.0237.77
4.3.00.0100.0277.77

preferences:
146.29 ms | 1394 KiB | 7 Q