3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowedAttachmentTypes = '.jpeg,.gif,.png,.jpg,.bmp'; $allowedAttachmentTypes = array_walk( (explode( ',', $allowedAttachmentTypes )), function( $var ) { return preg_replace( '#[\s\.]+#', '', $var ); } ); print_r( $allowedAttachmentTypes );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5EbWd
function name:  (null)
number of ops:  15
compiled vars:  !0 = $allowedAttachmentTypes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '.jpeg%2C.gif%2C.png%2C.jpg%2C.bmp'
    4     1        INIT_FCALL                                               'array_walk'
          2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR_NO_REF                               0          $2
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5EbWd%3A4%240'
    7     8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
    4    10        ASSIGN                                                   !0, $4
    9    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5EbWd%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5EbWd
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%23%5B%5Cs%5C.%5D%2B%23'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    7     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5EbWd%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.15 ms | 1395 KiB | 21 Q