3v4l.org

run code in 300+ PHP versions simultaneously
<?php $exception = ['will not'=>'will&nbs;pnot']; $string = 'They will not begin'; $string = strtr($string, $exception); $array = explode(' ', $string); $array = array_combine(array_values($array), array_values($array)); var_dump($array); $array = array_replace($array, array_intersect($array, array_flip($exception))); var_dump(array_values($array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uVHIR
function name:  (null)
number of ops:  45
compiled vars:  !0 = $exception, !1 = $string, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'They+will+not+begin'
    5     2        INIT_FCALL                                               'strtr'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    6     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '+'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    7    12        INIT_FCALL                                               'array_combine'
         13        INIT_FCALL                                               'array_values'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $9      
         16        SEND_VAR                                                 $9
         17        INIT_FCALL                                               'array_values'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $10     
         20        SEND_VAR                                                 $10
         21        DO_ICALL                                         $11     
         22        ASSIGN                                                   !2, $11
    8    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
    9    26        INIT_FCALL                                               'array_replace'
         27        SEND_VAR                                                 !2
         28        INIT_FCALL                                               'array_intersect'
         29        SEND_VAR                                                 !2
         30        INIT_FCALL                                               'array_flip'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $14     
         33        SEND_VAR                                                 $14
         34        DO_ICALL                                         $15     
         35        SEND_VAR                                                 $15
         36        DO_ICALL                                         $16     
         37        ASSIGN                                                   !2, $16
   10    38        INIT_FCALL                                               'var_dump'
         39        INIT_FCALL                                               'array_values'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                         $18     
         42        SEND_VAR                                                 $18
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.8 ms | 1400 KiB | 29 Q