3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'DisplayText="cf font=&quot;Arial" size="10" complexscriptsfont="Arial&quot; complexscriptssize="10" asiantextfont=&quot;Arial" fontcolor="595959"">'; $splitted = explode('"', $str); $splittedSize = count($splitted); $result = $splitted[0].'"'.implode('&quot;',array_slice($splitted,1,$splittedSize-2)).$splitted[$splittedSize-1].'"'; echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6qHhb
function name:  (null)
number of ops:  28
compiled vars:  !0 = $str, !1 = $splitted, !2 = $splittedSize, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'DisplayText%3D%22cf+font%3D%26quot%3BArial%22+size%3D%2210%22+complexscriptsfont%3D%22Arial%26quot%3B+complexscriptssize%3D%2210%22+asiantextfont%3D%26quot%3BArial%22+fontcolor%3D%22595959%22%22%3E'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%22'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        COUNT                                            ~7      !1
          7        ASSIGN                                                   !2, ~7
    6     8        FETCH_DIM_R                                      ~9      !1, 0
          9        CONCAT                                           ~10     ~9, '%22'
         10        INIT_FCALL                                               'implode'
         11        SEND_VAL                                                 '%26quot%3B'
         12        INIT_FCALL                                               'array_slice'
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 1
         15        SUB                                              ~11     !2, 2
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                         $12     
         18        SEND_VAR                                                 $12
         19        DO_ICALL                                         $13     
         20        CONCAT                                           ~14     ~10, $13
         21        SUB                                              ~15     !2, 1
         22        FETCH_DIM_R                                      ~16     !1, ~15
         23        CONCAT                                           ~17     ~14, ~16
         24        CONCAT                                           ~18     ~17, '%22'
         25        ASSIGN                                                   !3, ~18
    7    26        ECHO                                                     !3
    8    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.94 ms | 1406 KiB | 19 Q