3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "one, two, three"; $testArray = explode(",",$var); // comma separator. $var is used WHERE field in ($var) $bindings = implode(",", array_map(function($key) {return ':'.trim($key);}, $testArray)); var_export($bindings);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VZFo6
function name:  (null)
number of ops:  20
compiled vars:  !0 = $var, !1 = $testArray, !2 = $bindings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'one%2C+two%2C+three'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        INIT_FCALL                                               'implode'
          7        SEND_VAL                                                 '%2C'
          8        INIT_FCALL                                               'array_map'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVZFo6%3A6%240'
         10        SEND_VAL                                                 ~6
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !2, $8
    8    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FVZFo6%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VZFo6
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'trim'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        CONCAT                                           ~2      '%3A', $1
          5      > RETURN                                                   ~2
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVZFo6%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.47 ms | 1396 KiB | 23 Q