run code in 200+ php & hhvm versions
Bugs & Features
<?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(){ ${"gc_".$key} = get_post_meta(get_the_ID(), 'gc_'.$key.'', true); if ((isset(${"gc_".$key})) && (${"gc_".$key} != '')) { echo "<p class=\"goods-material\">$gc_".$key."</p>"; } } } } } 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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)