3v4l.org

run code in 300+ PHP versions simultaneously
<pre><?php echo phpversion() . "\n\n"; //* function foo($func) { $func("Johnny", 2, 3, 4); } $mfunc = function($a, $b, $c, $d) { echo "Hello, $a"; }; foo($mfunc); //*/ ?></pre>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZCi5
function name:  (null)
number of ops:  12
compiled vars:  !0 = $mfunc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Cpre%3E'
    3     1        INIT_FCALL                                               'phpversion'
          2        DO_ICALL                                         $1      
          3        CONCAT                                           ~2      $1, '%0A%0A'
          4        ECHO                                                     ~2
   10     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYZCi5%3A10%240'
          6        ASSIGN                                                   !0, ~3
   14     7        INIT_FCALL                                               'foo'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0          
   18    10        ECHO                                                     '%3C%2Fpre%3E'
         11      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZCi5
function name:  foo
number of ops:  8
compiled vars:  !0 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_DYNAMIC_CALL                                        !0
          2        SEND_VAL_EX                                              'Johnny'
          3        SEND_VAL_EX                                              2
          4        SEND_VAL_EX                                              3
          5        SEND_VAL_EX                                              4
          6        DO_FCALL                                      0          
    8     7      > RETURN                                                   null

End of function foo

Function %00%7Bclosure%7D%2Fin%2FYZCi5%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZCi5
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   11     4        NOP                                                      
          5        FAST_CONCAT                                      ~4      'Hello%2C+', !0
          6        ECHO                                                     ~4
   12     7      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYZCi5%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.42 ms | 1399 KiB | 16 Q