3v4l.org

run code in 300+ PHP versions simultaneously
<?php function append($str) { if(mb_strlen($str)>10) { str_replace($str, ' ...', -3); } } var_dump(append('very very long string'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XArN4
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'append'
          2        SEND_VAL                                                 'very+very+long+string'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function append:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/XArN4
function name:  append
number of ops:  12
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'mb_strlen'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        IS_SMALLER                                               10, $1
          5      > JMPZ                                                     ~2, ->11
    6     6    >   INIT_FCALL                                               'str_replace'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '+...'
          9        SEND_VAL                                                 -3
         10        DO_ICALL                                                 
    8    11    > > RETURN                                                   null

End of function append

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.11 ms | 1397 KiB | 20 Q