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; echo $var; global $$var = function(){ echo '123'; }; } } create_from_variable($product); $show_the_product_material();

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.0170.07718.93
5.4.260.0070.08018.99
5.4.250.0030.07318.75
5.4.240.0070.07318.74
5.4.230.0100.06018.92
5.4.220.0070.06018.75
5.4.210.0070.06318.72
5.4.200.0230.05718.74
5.4.190.0070.05718.99
5.4.180.0170.07018.73
5.4.170.0130.07018.62
5.4.160.0170.06318.74
5.4.150.0170.07018.86
5.4.140.0070.06316.32
5.4.130.0170.06016.50
5.4.120.0100.06716.52
5.4.110.0200.03716.47
5.4.100.0100.07316.33
5.4.90.0100.05016.46
5.4.80.0070.06016.53
5.4.70.0200.04016.46
5.4.60.0070.05016.49
5.4.50.0030.07316.34
5.4.40.0070.07316.33
5.4.30.0070.05316.35
5.4.20.0130.05316.41
5.4.10.0270.03716.33
5.4.00.0100.05715.83
5.3.280.0170.05314.66
5.3.270.0200.04714.59
5.3.260.0130.05714.68
5.3.250.0200.04714.58
5.3.240.0130.05314.61
5.3.230.0070.06714.68
5.3.220.0100.07014.54
5.3.210.0030.08314.54
5.3.200.0100.06314.79
5.3.190.0070.06014.65
5.3.180.0200.04714.55
5.3.170.0170.06014.78
5.3.160.0170.06314.55
5.3.150.0130.04314.54
5.3.140.0100.07014.39
5.3.130.0200.06314.62
5.3.120.0130.05314.61
5.3.110.0170.05314.54
5.3.100.0130.05714.03
5.3.90.0070.08014.10
5.3.80.0130.05714.18
5.3.70.0100.05014.02
5.3.60.0130.05014.08
5.3.50.0170.06313.93
5.3.40.0100.06013.79
5.3.30.0100.04713.73
5.3.20.0270.05313.76
5.3.10.0200.03713.72
5.3.00.0170.05013.80
5.2.170.0100.06011.10
5.2.160.0130.03711.22
5.2.150.0030.05311.17
5.2.140.0070.03711.23
5.2.130.0070.05011.00
5.2.120.0030.05711.18
5.2.110.0070.04011.09
5.2.100.0030.04011.32
5.2.90.0100.04011.18
5.2.80.0170.03711.18
5.2.70.0030.04311.16
5.2.60.0070.04711.16
5.2.50.0100.03711.10
5.2.40.0200.04011.22
5.2.30.0030.06011.13
5.2.20.0200.03311.04
5.2.10.0070.03711.07
5.2.00.0130.05310.80
5.1.60.0170.0439.97
5.1.50.0000.03710.25
5.1.40.0000.0409.92
5.1.30.0130.04710.57
5.1.20.0130.03710.43
5.1.10.0170.04310.14
5.1.00.0030.0509.91
5.0.50.0030.0378.54
5.0.40.0030.0308.61
5.0.30.0030.0438.37
5.0.20.0070.0338.11
5.0.10.0230.0208.27
5.0.00.0030.0478.20
4.4.90.0000.0306.81
4.4.80.0030.0236.81
4.4.70.0070.0276.81
4.4.60.0070.0236.81
4.4.50.0030.0276.81
4.4.40.0030.0336.81
4.4.30.0030.0276.81
4.4.20.0030.0276.81
4.4.10.0100.0236.81
4.4.00.0030.0376.81
4.3.110.0070.0306.81
4.3.100.0030.0236.81
4.3.90.0100.0276.81
4.3.80.0070.0306.81
4.3.70.0070.0236.81
4.3.60.0030.0236.81
4.3.50.0070.0236.81
4.3.40.0030.0406.81
4.3.30.0030.0206.81
4.3.20.0030.0206.81
4.3.10.0030.0276.81
4.3.00.0070.0236.34

preferences:
139.77 ms | 1394 KiB | 7 Q