Php - understanding create_function() - passing simple variable

后端 未结 1 920
情话喂你
情话喂你 2021-01-13 11:00

First time I am trying to use the dynamic create_function, and up to now, not much success :-)

My function is this :

 function o99_brsa_         


        
相关标签:
1条回答
  • 2021-01-13 11:12

    create_function was during the stone age , when kaᵠ used pen and paper to write applications, when PeeHaa埽 got a beer because he wrote hello would, The world is better now please use closures

    $f = function ($out) {
        echo $out;
    };
    
    $f("Welcome");
    

    You would thank me one day, But you can only use create_function if you are Gordon (The machine from the past sent here to torment us) he wrote this

    $fn = create_function(
        '$x',
        'return $x; } $foo = 42; function foo($int) { return $int; '
    );
    

    See Live Demo

    0 讨论(0)
提交回复
热议问题