3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "PHP What is PHP"; do { $result[] = $string; $string = preg_replace('/\s+\S+$/', '', $string, 1, $count); } while ($count); var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 1
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 1
filename:       /in/lks5N
function name:  (null)
number of ops:  16
compiled vars:  !0 = $string, !1 = $result, !2 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'PHP+What+is+PHP'
    6     1    >   ASSIGN_DIM                                               !1
          2        OP_DATA                                                  !0
    7     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F%5Cs%2B%5CS%2B%24%2F'
          5        SEND_VAL                                                 ''
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 1
          8        SEND_REF                                                 !2
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !0, $5
    8    11      > JMPNZ                                                    !2, ->1
   10    12    >   INIT_FCALL                                               'var_export'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.1 ms | 1000 KiB | 15 Q