3v4l.org

run code in 300+ PHP versions simultaneously
<?php $product = array('material', 'britelki', 'chaschka', 'kostochki', 'vkladish', 'zastejka'); if( !function_exists('create_from_variable') ){ 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.0100.07318.76
5.4.260.0300.04018.94
5.4.250.0100.06718.85
5.4.240.0070.05719.09
5.4.230.0200.05018.80
5.4.220.0170.06018.96
5.4.210.0130.05718.76
5.4.200.0100.05018.83
5.4.190.0170.06319.03
5.4.180.0170.07019.00
5.4.170.0230.03718.93
5.4.160.0130.07019.02
5.4.150.0230.06318.92
5.4.140.0070.07716.60
5.4.130.0170.04316.50
5.4.120.0070.05316.43
5.4.110.0130.04716.62
5.4.100.0230.05716.47
5.4.90.0070.07316.48
5.4.80.0130.06016.45
5.4.70.0100.05016.68
5.4.60.0270.05316.54
5.4.50.0030.05316.51
5.4.40.0000.05716.53
5.4.30.0100.04716.35
5.4.20.0030.05316.43
5.4.10.0100.05016.37
5.4.00.0170.06015.96
5.3.280.0000.06314.69
5.3.270.0100.06014.83
5.3.260.0100.08014.63
5.3.250.0070.07714.64
5.3.240.0100.05314.83
5.3.230.0170.04314.68
5.3.220.0070.06714.55
5.3.210.0170.06314.54
5.3.200.0170.04314.75
5.3.190.0030.06714.55
5.3.180.0070.05714.55
5.3.170.0200.06314.59
5.3.160.0130.05714.54
5.3.150.0170.08714.55
5.3.140.0100.05014.61
5.3.130.0100.07714.65
5.3.120.0070.05714.70
5.3.110.0130.06314.64
5.3.100.0070.05314.21
5.3.90.0100.05013.94
5.3.80.0070.05014.04
5.3.70.0170.04714.10
5.3.60.0070.05314.02
5.3.50.0130.04313.98
5.3.40.0070.05013.86
5.3.30.0000.05714.13
5.3.20.0070.04713.77
5.3.10.0070.07013.83
5.3.00.0130.04713.71
5.2.170.0130.05711.13
5.2.160.0030.04311.21
5.2.150.0070.05711.37
5.2.140.0070.04011.23
5.2.130.0030.06310.93
5.2.120.0000.06011.32
5.2.110.0070.04711.06
5.2.100.0000.06311.17
5.2.90.0130.05011.06
5.2.80.0030.04711.31
5.2.70.0000.05011.17
5.2.60.0070.04010.97
5.2.50.0100.04011.24
5.2.40.0100.05011.08
5.2.30.0030.04310.95
5.2.20.0070.04711.03
5.2.10.0030.04710.81
5.2.00.0070.05310.81
5.1.60.0100.0339.98
5.1.50.0030.0339.84
5.1.40.0100.0409.90
5.1.30.0030.04310.43
5.1.20.0100.03310.34
5.1.10.0070.04710.27
5.1.00.0070.0409.91
5.0.50.0070.0278.55
5.0.40.0030.0278.38
5.0.30.0030.0438.42
5.0.20.0000.0308.23
5.0.10.0000.0308.01
5.0.00.0070.0538.25
4.4.90.0000.0236.86
4.4.80.0100.0136.86
4.4.70.0030.0206.86
4.4.60.0000.0336.86
4.4.50.0100.0236.86
4.4.40.0030.0376.86
4.4.30.0070.0176.86
4.4.20.0000.0236.86
4.4.10.0030.0236.86
4.4.00.0000.0476.86
4.3.110.0070.0206.86
4.3.100.0100.0176.86
4.3.90.0000.0236.86
4.3.80.0000.0476.86
4.3.70.0000.0276.86
4.3.60.0100.0206.86
4.3.50.0070.0236.86
4.3.40.0000.0336.86
4.3.30.0030.0276.86
4.3.20.0070.0236.86
4.3.10.0030.0206.86
4.3.00.0100.0206.61

preferences:
143.23 ms | 1394 KiB | 7 Q