3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "one, two , three = ?, four = 'val', five , six = 1, seven, eight = 'val' , nine"; echo implode(', ', array_map(function($x){ return strpos($x, '=') === false ? $x.' = ?' : $x; }, array_map("trim", explode(',', $var))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SXKK4
function name:  (null)
number of ops:  20
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'one%2C+two+%2C+three+%3D+%3F%2C+four+%3D+%27val%27%2C+five++%2C+six+%3D+1%2C+seven%2C+eight+%3D+%27val%27+%2C+nine'
    4     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
    6     5        SEND_VAL                                                 ~2
          6        INIT_FCALL                                               'array_map'
          7        SEND_VAL                                                 'trim'
          8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%2C'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
    4    15        DO_ICALL                                         $5      
    6    16        SEND_VAR                                                 $5
    4    17        DO_ICALL                                         $6      
    6    18        ECHO                                                     $6
         19      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SXKK4
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3D'
          4        DO_ICALL                                         $1      
          5        TYPE_CHECK                                    4          $1
          6      > JMPZ                                                     ~2, ->10
          7    >   CONCAT                                           ~3      !0, '+%3D+%3F'
          8        QM_ASSIGN                                        ~4      ~3
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~4      !0
         11    > > RETURN                                                   ~4
    6    12*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.79 ms | 1430 KiB | 17 Q