3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_name = 'whatever.zip'; $file_types = array("zip" => "Application/Octet-Stream"); $file_extension = pathinfo($file_name, PATHINFO_EXTENSION); echo $file_types[$file_extension]; // displays Application/Octet-Stream ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j2dtU
function name:  (null)
number of ops:  10
compiled vars:  !0 = $file_name, !1 = $file_types, !2 = $file_extension
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'whatever.zip'
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'pathinfo'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 4
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    5     7        FETCH_DIM_R                                      ~7      !1, !2
          8        ECHO                                                     ~7
    6     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.02 ms | 1394 KiB | 15 Q