3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string of words.'; $words = explode(" ", $string); $lastword = array_pop($words); $vowels = array("a", "e", "i", "o", "u", "A", "E", "I", "O", "U", " "); $newlastword = str_replace($vowels, "", $lastword); $newstring=''; foreach ($words as $value) { $newstring=$newstring.' '.$value; } $newstring=$newstring.' '.$newlastword; echo $newstring;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/EgReU
function name:  (null)
number of ops:  30
compiled vars:  !0 = $string, !1 = $words, !2 = $lastword, !3 = $vowels, !4 = $newlastword, !5 = $newstring, !6 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'This+is+a+string+of+words.'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !1, $8
    7     6        INIT_FCALL                                               'array_pop'
          7        SEND_REF                                                 !1
          8        DO_ICALL                                         $10     
          9        ASSIGN                                                   !2, $10
    9    10        ASSIGN                                                   !3, <array>
   10    11        INIT_FCALL                                               'str_replace'
         12        SEND_VAR                                                 !3
         13        SEND_VAL                                                 ''
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !4, $13
   12    17        ASSIGN                                                   !5, ''
   13    18      > FE_RESET_R                                       $16     !1, ->24
         19    > > FE_FETCH_R                                               $16, !6, ->24
   14    20    >   CONCAT                                           ~17     !5, '+'
         21        CONCAT                                           ~18     ~17, !6
         22        ASSIGN                                                   !5, ~18
   13    23      > JMP                                                      ->19
         24    >   FE_FREE                                                  $16
   16    25        CONCAT                                           ~20     !5, '+'
         26        CONCAT                                           ~21     ~20, !4
         27        ASSIGN                                                   !5, ~21
   17    28        ECHO                                                     !5
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.57 ms | 1388 KiB | 19 Q