3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attributes = array( 'autocomplete' => 'off', 'class' => 'email', 'id' => 'myform', 'value' => 'foo "fizz buzz" bar', ); echo implode( ' ', array_map( fn($k, $v) => sprintf( '%s="%s"', $k, htmlspecialchars( $v, ENT_QUOTES, 'UTF-8' ) ), array_keys($attributes), $attributes ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZpGnF
function name:  (null)
number of ops:  16
compiled vars:  !0 = $attributes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'implode'
   11     2        SEND_VAL                                                 '+'
   12     3        INIT_FCALL                                               'array_map'
   13     4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   21     5        SEND_VAL                                                 ~2
   22     6        INIT_FCALL                                               'array_keys'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
   23    10        SEND_VAR                                                 !0
   12    11        DO_ICALL                                         $4      
   23    12        SEND_VAR                                                 $4
   10    13        DO_ICALL                                         $5      
   23    14        ECHO                                                     $5
   25    15      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZpGnF
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $k, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'sprintf'
   14     3        SEND_VAL                                                 '%25s%3D%22%25s%22'
   15     4        SEND_VAR                                                 !0
   16     5        INIT_FCALL                                               'htmlspecialchars'
   17     6        SEND_VAR                                                 !1
   18     7        SEND_VAL                                                 3
   19     8        SEND_VAL                                                 'UTF-8'
   16     9        DO_ICALL                                         $2      
   19    10        SEND_VAR                                                 $2
   13    11        DO_ICALL                                         $3      
   19    12      > RETURN                                                   $3
   21    13*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.79 ms | 1015 KiB | 18 Q