3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = array( 'From' => 'webmaster@example.com', 'Reply-To' => 'webmaster@example.com', 'X-Mailer' => 'PHP/' . phpversion(), ); function f($v, $k) { return $k . ': ' . $v; } print_r( implode("\r\n", array_map( 'f', $headers, array_keys($headers) )) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ltUT5
function name:  (null)
number of ops:  23
compiled vars:  !0 = $headers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~1      'webmaster%40example.com', 'From'
    5     1        ADD_ARRAY_ELEMENT                                ~1      'webmaster%40example.com', 'Reply-To'
    6     2        INIT_FCALL                                               'phpversion'
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      'PHP%2F', $2
          5        ADD_ARRAY_ELEMENT                                ~1      ~3, 'X-Mailer'
    3     6        ASSIGN                                                   !0, ~1
   11     7        INIT_FCALL                                               'print_r'
   12     8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%0D%0A'
         10        INIT_FCALL                                               'array_map'
   13    11        SEND_VAL                                                 'f'
   14    12        SEND_VAR                                                 !0
   15    13        INIT_FCALL                                               'array_keys'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $5      
         16        SEND_VAR                                                 $5
         17        DO_ICALL                                         $6      
         18        SEND_VAR                                                 $6
         19        DO_ICALL                                         $7      
         20        SEND_VAR                                                 $7
         21        DO_ICALL                                                 
   17    22      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ltUT5
function name:  f
number of ops:  6
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        CONCAT                                           ~2      !1, '%3A+'
          3        CONCAT                                           ~3      ~2, !0
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.02 ms | 1396 KiB | 23 Q