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){ echo $var; $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.0200.05719.08
5.4.260.0130.06718.74
5.4.250.0130.06018.97
5.4.240.0300.07018.81
5.4.230.0200.07018.74
5.4.220.0100.07318.96
5.4.210.0100.06318.94
5.4.200.0070.07718.98
5.4.190.0070.07018.72
5.4.180.0200.06318.91
5.4.170.0130.06018.93
5.4.160.0070.08018.76
5.4.150.0030.08718.97
5.4.140.0100.07716.59
5.4.130.0100.06716.47
5.4.120.0130.05016.61
5.4.110.0070.05716.60
5.4.100.0200.06016.68
5.4.90.0130.06016.55
5.4.80.0030.05316.40
5.4.70.0100.05016.63
5.4.60.0070.07716.36
5.4.50.0070.06016.29
5.4.40.0100.06316.62
5.4.30.0130.05316.45
5.4.20.0130.04716.35
5.4.10.0070.06716.45
5.4.00.0100.06015.99
5.3.280.0100.08014.58
5.3.270.0100.06714.77
5.3.260.0100.06014.70
5.3.250.0100.06014.79
5.3.240.0170.06014.61
5.3.230.0130.05714.74
5.3.220.0030.08014.75
5.3.210.0170.05014.55
5.3.200.0200.07714.70
5.3.190.0200.04314.66
5.3.180.0170.06014.70
5.3.170.0030.05714.64
5.3.160.0070.06314.64
5.3.150.0030.06014.41
5.3.140.0130.06714.46
5.3.130.0030.06014.77
5.3.120.0230.06014.55
5.3.110.0100.05314.71
5.3.100.0100.05314.12
5.3.90.0170.05014.16
5.3.80.0230.05314.00
5.3.70.0130.06314.11
5.3.60.0170.05013.83
5.3.50.0100.06313.98
5.3.40.0130.06314.03
5.3.30.0000.06714.13
5.3.20.0130.05313.71
5.3.10.0000.05713.62
5.3.00.0200.05313.74
5.2.170.0100.05311.22
5.2.160.0070.04011.12
5.2.150.0030.04711.21
5.2.140.0130.04711.10
5.2.130.0100.03711.29
5.2.120.0100.05311.07
5.2.110.0030.06311.17
5.2.100.0170.05011.06
5.2.90.0100.05011.25
5.2.80.0130.04311.25
5.2.70.0070.05011.16
5.2.60.0100.05311.28
5.2.50.0130.04011.09
5.2.40.0130.04711.09
5.2.30.0070.05711.05
5.2.20.0130.04310.79
5.2.10.0100.05011.02
5.2.00.0100.04710.94
5.1.60.0070.0409.98
5.1.50.0100.0439.96
5.1.40.0030.03310.08
5.1.30.0100.04010.30
5.1.20.0070.05010.44
5.1.10.0000.0439.91
5.1.00.0100.03010.08
5.0.50.0000.0408.58
5.0.40.0000.0408.38
5.0.30.0000.0608.29
5.0.20.0000.0408.29
5.0.10.0030.0338.32
5.0.00.0130.0378.23
4.4.90.0030.0306.86
4.4.80.0070.0206.86
4.4.70.0070.0276.86
4.4.60.0030.0236.86
4.4.50.0100.0136.86
4.4.40.0100.0376.86
4.4.30.0100.0206.86
4.4.20.0000.0376.86
4.4.10.0070.0206.86
4.4.00.0070.0376.86
4.3.110.0070.0206.86
4.3.100.0100.0336.86
4.3.90.0030.0306.86
4.3.80.0030.0436.86
4.3.70.0070.0236.86
4.3.60.0100.0236.86
4.3.50.0030.0206.86
4.3.40.0030.0406.86
4.3.30.0070.0206.86
4.3.20.0030.0206.86
4.3.10.0070.0276.86
4.3.00.0130.0206.61

preferences:
136.91 ms | 1394 KiB | 7 Q