3v4l.org

run code in 300+ PHP versions simultaneously
<?php function serializeContext($default, $optional) { return "'" . implode("', '", array_merge( $default, $optional )) . "'" ; } var_dump(serializeContext(array('test1', 'test2'), 'test3'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hIOVc
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'serializecontext'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 'test3'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function serializecontext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hIOVc
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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.42 ms | 1398 KiB | 20 Q