3v4l.org

run code in 300+ PHP versions simultaneously
<?php function serializeContext($default, $optional) { return "'" . implode("', '", array_merge( $default, $optional )) . "'" ; } $a = array('test1', 'test2', 'test4'); $b = array('test3'); //var_dump(serializeContext($a, $b)); echo array_reduce($a, function($carry, $next){ return $carry . $next; }, '');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Kh58
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_reduce'
          3        SEND_VAR                                                 !0
   16     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9Kh58%3A16%240'
   19     5        SEND_VAL                                                 ~4
          6        SEND_VAL                                                 ''
          7        DO_ICALL                                         $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Function serializecontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Kh58
function name:  serializeContext
number of ops:  14
compiled vars:  !0 = $default, !1 = $optional
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%27%2C+%27'
          4        INIT_FCALL                                               'array_merge'
    5     5        SEND_VAR                                                 !0
    6     6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        CONCAT                                           ~4      '%27', $3
    7    11        CONCAT                                           ~5      ~4, '%27'
         12      > RETURN                                                   ~5
    8    13*     > RETURN                                                   null

End of function serializecontext

Function %00%7Bclosure%7D%2Fin%2F9Kh58%3A16%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Kh58
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $carry, !1 = $next
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        CONCAT                                           ~2      !0, !1
          3      > RETURN                                                   ~2
   19     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9Kh58%3A16%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.4 ms | 1396 KiB | 19 Q